Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] typescript-axios generates any instead of AxiosRequestConfig for factory interface #15985

Closed
4 of 6 tasks
MarekBodingerBA opened this issue Jul 3, 2023 · 0 comments · Fixed by #18978
Closed
4 of 6 tasks

Comments

@MarekBodingerBA
Copy link
Contributor

MarekBodingerBA commented Jul 3, 2023

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • 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
  1. 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

@MarekBodingerBA MarekBodingerBA changed the title [BUG] Description [BUG] typescript-axios generates any instead of AxiosRequestConfig for factory interface Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant