OpenAPITools / OpenAPITools/openapi-generator
[BUG] typescript-axios does not change reserved type in reference
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
I'm using docker version and genreate api. I have declaration "Error" in my swagger and reference on it in declaration (Response).
I get error message, that "Error" is busy and will replaced with ModelError.
When i check generated files Error declaration was renamed, but link on it in "Response" - not
openapi-generator version
3.0.1
OpenAPI declaration file content or url
Generation Details
docker run --rm \
-v ${PWD}/libs/api:/local openapitools/openapi-generator-cli generate \
-i /local/swagger2.json \
-g typescript-axios \
-o /local/src/api \
--skip-validate-spec \
--additional-properties=useSingleRequestParameter=true
Steps to reproduce
Just run command
Suggest a fix
I found solution, but looks not good for me, i've added
--type-mappings Error=ModelError
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the linked OpenAPI declaration and the shown typescript-axios Docker command. Compare the renamed Error model with the reference used by Response; done means generated references point to the renamed model consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100