Open amyfelicia opened 1 year ago
Can you provide an openapi.json file?
I just bumped into this. A minimal example to reproduce the problem:
{
"openapi": "3.0.1",
"info": {
"version": "1.0",
"title": "Title"
},
"components": {
"schemas": {
"Registry": {
"type": "string",
"enum": [
"A",
"B-B"
]
}
}
}
}
The error:
% openapi-python-generator mini.json output
Generating data from mini.json
Error in model Registry: cannot assign to expression here. Maybe you meant '==' instead of '='? (<string>, line 6)
Describe the bug Hi I'm trying to use the generator to translate some enums. I have a few enums and some were successfully generated and some didn't. I realised that the ones that caused an error has dash in it. Here are 2 examples:
This is the error message:
To Reproduce You can create any OpenAPI JSON specs with the enums I provided and run the openapi-python-generator
Expected behavior I expect the enum to be created like any other enums
Desktop (please complete the following information):