ruby/psych

Yes, no and YAML version 1.2 support

Polo2 opened this issue ยท 0 comments

Polo2 commented

Hi ๐Ÿ‘‹ ,

Many thanks for all the work here, I'm very glad to parse some YAML files without thinking to it.

Today I had to investigate about a bit more, since a user made us an unexpected feedback, especially for Norwegian ๐Ÿ‡ณ๐Ÿ‡ด people.
Let's take this yaml file about languages:

language:
  type: string
  enum: 
    - en
    - fr
    - no
    - it

After some parsing for OpenAPI documentation, generated description was:

Values are en, fr, false, it

Obviously, Norwegian language was translated as false.
Digging into this, I understood it was YAML normal behavior for version 1.1, and that it will be changed with YAML 1.2

Of course we've suggested a workaround, to adapt YAML file with 'no' instead of no.
But just for asking, do you plan to support this new YAML spec version?