swagger-converter icon indicating copy to clipboard operation
swagger-converter copied to clipboard

Enum Values 'TRUE' and 'FALSE' are converted Incorrectly in yaml

Open fibsifan opened this issue 3 years ago • 0 comments

When converting 2.0 enum values to 3.0 using the converter API hosted at https://converter.swagger.io/api/convert the necessary escaping for string values 'TRUE' and 'FALSE' gets lost in the Process.

example input (excerpt):

definitions:
  Element:
    properties:
      tristate:
        - 'TRUE'
        - 'FALSE'
        - EMPTY

output

components:
  schemas:
    Element:
      properties:
        tristate:
          - TRUE
          - FALSE
          - EMPTY

TRUE and FALSE are yaml boolean literals that need to be escaped, see https://yaml.org/type/bool.html

fibsifan avatar Sep 03 '21 18:09 fibsifan