openapi-generator
openapi-generator copied to clipboard
[BUG] typescript-axios generates any instead of AxiosRequestConfig for factory interface
Bug Report Checklist
- [X] Have you provided a full/minimal spec to reproduce the issue?
- [X] Have you validated the input using an OpenAPI validator (example)?
- [ ] Have you tested with the latest master to confirm the issue still exists?
- [X] Have you searched for related issues/PRs?
- [X] What's the actual output vs expected output?
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
typescript-axios generates correct options type in functional programming interface but uses any in factory interface although the latter calls the former.
openapi-generator version
"@openapitools/openapi-generator-cli": "^2.6.0"
OpenAPI declaration file content or url
https://nest-forms-backend.staging.bratislava.sk/api-json
Steps to reproduce
- Generate client using:
openapi-generator-cli generate -i https://nest-forms-backend.staging.bratislava.sk/api-json -g typescript-axios -o ./clients/openapi-forms --skip-validate-spec
Suggest a fix
Generate AxiosRequestConfig type instead of any in factory interface.
Probably this line needs to be fixed: https://github.com/OpenAPITools/openapi-generator/blob/ba0c73e16427f40994e3a53a014548f8ffdba431/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache#L281C1-L281C1