swagger-api / swagger-api/swagger-codegen
Swagger codegen does not run behind company proxy!?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
I'm running java -jar swagger-codegen-cli.jar generate -i https://api.angular.schule/swagger.json -l typescript-angular behind an evil company proxy. It does not work. 😢
Swagger-codegen version
2.4.0 SNAPSHOT
Steps to reproduce
Execute swagger codegen behind a company proxy to read the swagger.json of a API in the internet. You get a timeout:
java -jar swagger-codegen-cli.jar generate -i https://api.angular.schule/swagger.json -l typescript-angular
[main] INFO io.swagger.parser.Swagger20Parser - reading from https://api.angular.schule/swagger.json
[main] ERROR io.swagger.parser.util.RemoteUrl - unable to read
java.net.ConnectException: Connection timed out: connect
Suggest a fix/enhancement
Swagger codegen should take the following environment variables into account:
HTTP_PROXYHTTPS_PROXYNO_PROXY
Cheers! 🍺
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
Start with the documented java -jar swagger-codegen-cli.jar generate command and the io.swagger.parser.util.RemoteUrl failure shown in the report. Reproduce the timeout using the supplied Swagger URL behind a proxy, then verify that HTTP_PROXY, HTTPS_PROXY, and NO_PROXY are honored and that generation succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100