OpenAPITools / OpenAPITools/openapi-generator
[BUG] multipart/form-data in Swift URL instead of Data
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
This part:
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"Trekk": {
"type": "string",
"format": "binary"
}
}
}
}
}
},
generates
open class func adventuresUploadTrackWithRequestBuilder(id: String, trekk: URL? = nil) -> RequestBuilder<String> {///}
and then inside that it generates
let localVariableFormParams: [String: Any?] = [
"Trekk": trekk?.encodeToJSON(), // json?
]
Adding --global-property skipFormModel=false does not do anything.
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 from the Swift operation entry point adventuresUploadTrackWithRequestBuilder and reproduce the multipart/form-data example with skipFormModel=false. Trace how the binary Trekk field is represented in the generated request, then verify that the generated client uses the expected data type and form encoding instead of URL JSON encoding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, swift
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100