aa4d9e16b134bd1996daf718661ae84f42f3e774
6 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Zuul
|
9ea8e742bf | Merge "YAML version support" | ||
|
Gorka Eguileor
|
643fe11eb9 |
README: Fix missing \
Change-Id: I9d8b5ee8f860c6de6ca2006ec85f9bb8f7a02e47 |
||
|
Gorka Eguileor
|
87ff2fe25e |
YAML version support
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 |
||
|
Artem Goncharov
|
2cebebd4d6 |
Update project readme
- add services added recently - add info about sdk/cli/tui that are generated using codegenerator. Change-Id: Id41a3262be58deefd1f127a4c1a0df0b3b2e0aec |
||
|
Stephen Finucane
|
2006931337 |
Add getting started guide to README
This is a first pass. As noted in the TODO, we should expand on this further but that's a job for another day. Change-Id: Icd44f0665995be66eba9f292e5c030be2ced9ac4 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> |
||
|
gtema
|
4d23d8aab5 |
Initial import
Depends-On: https://review.opendev.org/c/openstack/governance/+/910581 Change-Id: I87866224d9ac89d3da150c95a86a20afb48dc4d2 |