Mattijs van Ommeren

Results 4 comments of Mattijs van Ommeren

While `postProcessModelsEnum` is called here: https://github.com/OpenAPITools/openapi-generator/blob/73f2d8289b2d4069675c79ea5375d9c58ea1853c/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java#L870 its effects are overwritten by the code block further down: https://github.com/OpenAPITools/openapi-generator/blob/73f2d8289b2d4069675c79ea5375d9c58ea1853c/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java#L986C1-L998C14 I created PR #18566 preventing the `NUMBER_X` transformation to run if `x-enum-varnames` is...

It turns out there are still some complications with this PR, as moving the `postProcessModelsEnum` will cause the generator to emit faulty variable names for string enums: E.g.: ```python class...

Since the desired enum post processor is run **before** all other transformations in the Python generator, a working approach is to prevent the enum transformation for int enums to run...

@wing328 I have added the definitions below to `petstore-with-fake-endpoints-models-for-testing.yaml` and I have executed `bin/generate-samples.sh`. Is there anything else I need to do, like defining the expected results somewhere? ```yaml enum_number_vendor_ext:...