OpenAPITools / OpenAPITools/openapi-generator
[REQ] Feature Request Description
Open
Nobody has claimed this yet.
Enhancement: Feature
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
Yes, I would need to support "application/octet-stream" in the Swift generator.
Describe the solution you'd like
- In
URLSessionRequestBuilder.execute(), check ifcontentType.hasPrefix("application/octet-stream")and initializeOctetStreamEncoding() - Create a new
OctetStreamEncodingclass - Duplicate
FormURLEncodingcontent and replace "application/x-www-form-urlencoded" by "application/octet-stream" toOctetStreamEncoding
Describe alternatives you've considered
Override URLSessionRequestBuilder.execute() but it will duplicate too many lines
Additional context
I need to be able to upload a file into a server accepting only content-type: "application/octet-stream"
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 in the Swift generator at URLSessionRequestBuilder.execute() and inspect the existing FormURLEncoding implementation. Add the requested OctetStreamEncoding support for application/octet-stream and verify that generated clients can upload files to servers requiring that content type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100