When exporting OpenAPI in YAML format we are exporting in YAML version
1.2, which is the latest. The problem with that is that there are tools
that use the PyYAML [1] python package to read these files, and that
package only supports YAML v1.1, which will lead to reading things
incorrectly.
An example is with booleans.
In v1.1 a lot of values are considered as booleans (case insensitive):
true, false, 1, 0, off, on, no, yes... But in v1.2 only true and false
are considered booleans, so the others don't need to be quoted.
As an example we were generating something like this:
```
os_hypervisors_with_servers:
in: query
name: with_servers
schema:
type:
- boolean
- string
enum:
- true
- 'True'
- 'TRUE'
- 'true'
- '1'
- ON
- On
- on
- YES
- Yes
- yes
- false
- 'False'
- 'FALSE'
- 'false'
- '0'
- OFF
- Off
- off
- NO
- No
- no
x-openstack:
min-ver: '2.53'
```
Which is incorrectly interpreted by PyYAML like this:
```
enum:
- true
- 'True'
- 'TRUE'
- 'true'
- '1'
- true
- true
- true
- true
- true
- true
- false
- 'False'
- 'FALSE'
- 'false'
- '0'
- false
- false
- false
- false
- false
- false ```
```
To fix this we enable our tool to output the specs in v1.1 with a new
parameter `--yaml-version` so that when it's set to 1.1 it will quote
all booleans that in v1.1 could be misinterpreted.
[1]: https://pypi.org/project/PyYAML/
Change-Id: I7236f6a94ccb2e92a086c16895efa4dc557460c4