Skip to content

Commit

Permalink
Use valid identifiers for x-enum-varnames
Browse files Browse the repository at this point in the history
openapi-generator (which is the only generator I am aware of which
supports x-enum-varnames) uses x-enum-varnames as identifiers verbatim.
Therefore, they must be valid identifiers (in all languages).
Unfortunately, whatever capitalization convention we use will look weird
in some languages.  Choose a common one for now.

See OpenAPITools/openapi-generator#3246 for discussion.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information
kevinoid committed Nov 18, 2022
1 parent b836cf5 commit 68a4ccd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2502,10 +2502,13 @@ components:
- 0
- 1
- 2
# Note: x-enum-varnames used as identifiers verbatim by openapi-generator.
# Choice of identifier casing convention is necessarily arbitrary.
# https://github.com/OpenAPITools/openapi-generator/issues/3246
x-enum-varnames:
- Any
- Only Selected
- All Except Selected
- ANY
- ONLY_SELECTED
- ALL_EXCEPT_SELECTED
x-enum-descriptions:
- Any project can be deployed to the environment.
- Only selected projects can be deployed to the environment.
Expand Down

0 comments on commit 68a4ccd

Please sign in to comment.