swagger-api / swagger-api/swagger-codegen
[python] Add support to Accept-Encoding: GZIP
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Swagger codegen seems to be missing GZIP support on Python, this is a needed improvement in many use cases.
Related issues/PRs
Generic issue: #3365
Suggest a fix/enhancement
Since urllib3 automatically supports decoding gzip responses, this could be fixed by adding "Accept-Encoding: GZIP" header to the request.
Looking at the other implementation (#5525 #3365) raises a few questions:
- Should this option be configurable?
- Where should we add the option? (as default_headers in api_client, request() in rest)
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 by tracing the Python client's request flow through the mentioned api_client and rest entry points, comparing default_headers with request(). Resolve whether gzip support should be configurable and where the Accept-Encoding header belongs. Done means Python-generated clients advertise GZIP consistently and the chosen behavior is covered by the relevant request handling tests, if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100