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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When generating the model files the prefix is properly added once in front of the generated files. However, in the import statements the prefix is added twice resulting in erroneous statements breaking the build.
When e.g. SomePrefix is set for modelNamePrefix, then the following model files are generated for example-for-file-naming-option.yaml:
SomePrefixPetCategory.ts
SomePrefixPet.ts
However, withinSomePrefixPet.ts it looks like this:
Bug Report Checklist
Description
When generating the model files the prefix is properly added once in front of the generated files. However, in the import statements the prefix is added twice resulting in erroneous statements breaking the build.
When e.g.
SomePrefix
is set formodelNamePrefix
, then the following model files are generated forexample-for-file-naming-option.yaml
:SomePrefixPetCategory.ts
SomePrefixPet.ts
However, within
SomePrefixPet.ts
it looks like this:I.e.
SomePrefix
is added twice.openapi-generator version
Issue started in version
7.6.0
and is still there in currentmaster
.Version
7.5.0
is working fine.OpenAPI declaration file content or url
It can be reproduced using
modules/openapi-generator/src/test/resources/3_0/typescript-fetch/example-for-file-naming-option.yaml
from the repo:https://github.com/OpenAPITools/openapi-generator/blob/v7.6.0/modules/openapi-generator/src/test/resources/3_0/typescript-fetch/example-for-file-naming-option.yaml
Generation Details
Steps to reproduce
See command above
Related issues/PRs
Nothing found.
Suggest a fix
It's probably due to this PR which touched a bit of relevant code between 7.5.0 and 7.6.0: #18284
The text was updated successfully, but these errors were encountered: