Open PeteFlugstad opened 4 weeks ago
my take is to create another library called "native-nextgen" with the breaking changes
and later we will do a swap
native => native-deprecated native-nextgen => native
that way users can fallback easily for easier, smoother migration.
we did this before for jersey2 and okhttp-gson to allow breaking changes with fallback by adding another library option.
my take is to create another library called "native-nextgen" with the breaking changes
I think you commented on the wrong bug?
oh right. sorry
just replied to https://github.com/OpenAPITools/openapi-generator/issues/12787 instead.
@PeteFlugstad if the enum name can be customized with the enumNameMappings
option, would that fix your issue?
ref: https://github.com/openapitools/openapi-generator/blob/master/docs/customization.md#name-mapping
Bug Report Checklist
Description
I'm trying to generate C code for an API with a model (task) that has two enums in it (TaskType and TaskStatus)
I'm seeing name collisions in the generated output, similar to an older (fixed) bug BUG: 4293
Here is the generated model header: (model/task.h):
The two enums collide both the the NIL and NULL enum value and the name of of the typedef (fastapi_task__e).
Looking at the model-header.mustache, I see:
I would expect to see the {{enumName}} ("TaskType" or "TaskStatus" ) embedded in the names, which would fix them for uniqueness.
Is my yaml missing something?
openapi-generator version
openapi-generator-cli-7.9.0.jar
OpenAPI declaration file content or url
https://gist.github.com/PeteFlugstad/8ca8bd25a7aed7015b6634ddd77560c4
Generation Details
openapi-generator-cli-7.9.0.jar
Steps to reproduce
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/4293
Suggest a fix
Seems like the {{enumName}} field is not being parsed or populated correctly from the yaml.