-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[BUG] [typescript-angular] Use a relative basePath #10697
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
Comments
Would you like to fix this? |
Any idea where I should look to fix this? I have looked at the code but couldn't find the localhost part anywhere. |
already fixed in #10056 waiting for PR merge. this is a general problem. the cli tool just adds a http://localhost if the address is relative because the path gets wrapped in URL class which adds localhost automaticlly if no host part exists added a check if url ist relativ just save as is |
Uh oh!
There was an error while loading. Please reload this page.
Bug Report Checklist
Description
I am using the typescript-angular generator. In the api.service it generates a basePath using http://localhost when you use a relative path.
openapi-generator version
5.3.1
OpenAPI declaration file content or url
Steps to reproduce
Set the url in the openapi specification to a relative path, for example
/api
. When you run the typescript-angular generator now, it will generate the basePath in the api.service ashttp://localhost/api
instead of/api
Related issues/PRs
#2731
#8576
Suggest a fix
Remove the prefixed
http://localhost
when a relative path is used.The text was updated successfully, but these errors were encountered: