APIs-guru / google-discovery-to-swagger

Script for converting Google Discovery format into OpenAPI (swagger) 3.0
MIT License
59 stars 17 forks source link

`NO` and friends need to be escaped #22

Closed armanbilge closed 3 years ago

armanbilge commented 3 years ago

See for example https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/bigquery/v2/openapi.yaml#L5036

There NO is supposed to be a string, but parsers read it as a boolean due to the YAML spec. In fact, there's several boolean-like strings you should be escaping: https://yaml.org/type/bool.html

Thanks for an awesome resource!

MikeRalphson commented 3 years ago

No, only YAML 1.1 has this issue. All current versions of OpenAPI recommend using YAML 1.2

armanbilge commented 3 years ago

Apologies, I wasn't aware of that. Thanks for the response, much appreciated!