Skip to content

Commit 5f193e2

Browse files
committed
Use valid identifiers for x-enum-varnames
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 <[email protected]>
1 parent 53c4fbb commit 5f193e2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

openapi.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,10 +2502,13 @@ components:
25022502
- 0
25032503
- 1
25042504
- 2
2505+
# Note: x-enum-varnames used as identifiers verbatim by openapi-generator.
2506+
# Choice of identifier casing convention is necessarily arbitrary.
2507+
# https://github.com/OpenAPITools/openapi-generator/issues/3246
25052508
x-enum-varnames:
2506-
- Any
2507-
- Only Selected
2508-
- All Except Selected
2509+
- ANY
2510+
- ONLY_SELECTED
2511+
- ALL_EXCEPT_SELECTED
25092512
x-enum-descriptions:
25102513
- Any project can be deployed to the environment.
25112514
- Only selected projects can be deployed to the environment.

0 commit comments

Comments
 (0)