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

Error on non-string path variables #257

Closed
developerTN opened this issue Feb 26, 2021 · 8 comments
Closed

Error on non-string path variables #257

developerTN opened this issue Feb 26, 2021 · 8 comments
Labels

Comments

@developerTN
Copy link

Hello community,

I have upgrated the ng-swagger-gen lib to the latest version (it was 1.7.0) and now I have a lot of errors mainly this error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
as far I saw the paths now are generating using encodeURIComponent
how can I disable this ? it looks to me a breaking a change especially that I have more than 100 services that is throwing this error

@developerTN
Copy link
Author

@luisfpg

@luisfpg
Copy link
Collaborator

luisfpg commented Feb 26, 2021

Can you show an example of both the descriptor and the generated file?
The latest version is 2.3.0, there might be breaking changes in relation to 1.7.0.

@developerTN
Copy link
Author

developerTN commented Feb 26, 2021

here is a screenshot
image

@developerTN
Copy link
Author

@luisfpg it's should be due to the encodeURIComponent that wasn't present before in URLs

@luisfpg luisfpg changed the title Errors after upgrade to latest version Error on non-string path variables Feb 26, 2021
@luisfpg
Copy link
Collaborator

luisfpg commented Feb 26, 2021

Fix released in version 2.3.1

@developerTN
Copy link
Author

@luisfpg thanks a lot :) how can I download this version ? is it already available with npm install ?

@luisfpg
Copy link
Collaborator

luisfpg commented Feb 26, 2021

It is already available in npm.

@developerTN
Copy link
Author

thanks a lot, problem solved !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants