You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Python] Fix the post processing of string enums (#20976)
* fix/ x-enum-varnames in python
* make x-enum-varnames examples more clear
* make x enum varname usage more explicit
* fix tests
* trigger tests
* trigger tests once again...
* fix more tests
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \"\\
7
+
8
+
The version of the OpenAPI document: 1.0.0
9
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+
Do not edit the class manually.
12
+
"""# noqa: E501
13
+
14
+
15
+
from __future__ importannotations
16
+
importjson
17
+
fromenumimportEnum
18
+
fromtyping_extensionsimportSelf
19
+
20
+
21
+
classEnumNumberVendorExt(int, Enum):
22
+
"""
23
+
EnumNumberVendorExt
24
+
"""
25
+
26
+
"""
27
+
allowed enum values
28
+
"""
29
+
FortyTwo=42
30
+
Eigtheen=18
31
+
FiftySix=56
32
+
33
+
@classmethod
34
+
deffrom_json(cls, json_str: str) ->Self:
35
+
"""Create an instance of EnumNumberVendorExt from a JSON string"""
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \"\\
7
+
8
+
The version of the OpenAPI document: 1.0.0
9
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+
Do not edit the class manually.
12
+
"""# noqa: E501
13
+
14
+
15
+
from __future__ importannotations
16
+
importjson
17
+
fromenumimportEnum
18
+
fromtyping_extensionsimportSelf
19
+
20
+
21
+
classEnumStringVendorExt(str, Enum):
22
+
"""
23
+
EnumStringVendorExt
24
+
"""
25
+
26
+
"""
27
+
allowed enum values
28
+
"""
29
+
FOO_XEnumVarname='FOO'
30
+
BarVar_XEnumVarname='Bar'
31
+
bazVar_XEnumVarname='baz'
32
+
33
+
@classmethod
34
+
deffrom_json(cls, json_str: str) ->Self:
35
+
"""Create an instance of EnumStringVendorExt from a JSON string"""
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \"\\
7
+
8
+
The version of the OpenAPI document: 1.0.0
9
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
0 commit comments