Skip to content

Commit a42c39c

Browse files
committed
make x enum varname usage more explicit
1 parent ea69c58 commit a42c39c

File tree

9 files changed

+15
-23
lines changed

9 files changed

+15
-23
lines changed

modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2340,9 +2340,9 @@ components:
23402340
- 'Description for Bar'
23412341
- 'Description for baz'
23422342
x-enum-varnames:
2343-
- FOOVar
2344-
- BarVar
2345-
- bazVar
2343+
- FOO_XEnumVarname
2344+
- BarVar_XEnumVarname
2345+
- bazVar_XEnumVarname
23462346
OuterEnumDefaultValue:
23472347
type: string
23482348
enum:

samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES

-2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,4 @@ setup.cfg
252252
setup.py
253253
test-requirements.txt
254254
test/__init__.py
255-
test/test_enum_number_vendor_ext.py
256-
test/test_enum_string_vendor_ext.py
257255
tox.ini

samples/openapi3/client/petstore/python-aiohttp/docs/EnumStringVendorExt.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
## Enum
55

6-
* `FOOVar` (value: `'FOO'`)
6+
* `FOO_XEnumVarname` (value: `'FOO'`)
77

8-
* `BarVar` (value: `'Bar'`)
8+
* `BarVar_XEnumVarname` (value: `'Bar'`)
99

10-
* `bazVar` (value: `'baz'`)
10+
* `bazVar_XEnumVarname` (value: `'baz'`)
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1313

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/enum_string_vendor_ext.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class EnumStringVendorExt(str, Enum):
2626
"""
2727
allowed enum values
2828
"""
29-
FOOVar = 'FOO'
30-
BarVar = 'Bar'
31-
bazVar = 'baz'
29+
FOO_XEnumVarname = 'FOO'
30+
BarVar_XEnumVarname = 'Bar'
31+
bazVar_XEnumVarname = 'baz'
3232

3333
@classmethod
3434
def from_json(cls, json_str: str) -> Self:

samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/.openapi-generator/FILES

-2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,4 @@ setup.cfg
252252
setup.py
253253
test-requirements.txt
254254
test/__init__.py
255-
test/test_enum_number_vendor_ext.py
256-
test/test_enum_string_vendor_ext.py
257255
tox.ini

samples/openapi3/client/petstore/python-pydantic-v1/.openapi-generator/FILES

-2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,4 @@ setup.cfg
252252
setup.py
253253
test-requirements.txt
254254
test/__init__.py
255-
test/test_enum_number_vendor_ext.py
256-
test/test_enum_string_vendor_ext.py
257255
tox.ini

samples/openapi3/client/petstore/python/.openapi-generator/FILES

-2
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,4 @@ setup.cfg
252252
setup.py
253253
test-requirements.txt
254254
test/__init__.py
255-
test/test_enum_number_vendor_ext.py
256-
test/test_enum_string_vendor_ext.py
257255
tox.ini

samples/openapi3/client/petstore/python/docs/EnumStringVendorExt.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
## Enum
55

6-
* `FOOVar` (value: `'FOO'`)
6+
* `FOO_XEnumVarname` (value: `'FOO'`)
77

8-
* `BarVar` (value: `'Bar'`)
8+
* `BarVar_XEnumVarname` (value: `'Bar'`)
99

10-
* `bazVar` (value: `'baz'`)
10+
* `bazVar_XEnumVarname` (value: `'baz'`)
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1313

samples/openapi3/client/petstore/python/petstore_api/models/enum_string_vendor_ext.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class EnumStringVendorExt(str, Enum):
2626
"""
2727
allowed enum values
2828
"""
29-
FOOVar = 'FOO'
30-
BarVar = 'Bar'
31-
bazVar = 'baz'
29+
FOO_XEnumVarname = 'FOO'
30+
BarVar_XEnumVarname = 'Bar'
31+
bazVar_XEnumVarname = 'baz'
3232

3333
@classmethod
3434
def from_json(cls, json_str: str) -> Self:

0 commit comments

Comments
 (0)