swagger-api / swagger-api/swagger-codegen
Python swagger-codegen hard-coded base URL
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Swagger API client for python should allow for the base URL to be passed via arguments at runtime
Swagger-codegen version
2.3.1
Swagger declaration file content or url
Any, can use petstore.
Command line used for generation
swagger-codegen generate -i swagger.yaml -l python -o client-lib
Steps to reproduce
Cannot pass URL to client library
Related issues/PRs
Suggest a fix/enhancement
Instead of hard-coding the base URL like here, instead pass it as a parameter to init in Configuration (or anywhere else that makes sense).
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 samples/client/petstore/python/petstore_api/configuration.py and the generation command shown in the issue. Trace how the Python client's Configuration is created and how the base URL is set. Done means the generated client can receive a runtime base URL instead of relying on the hard-coded value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100