This repository was archived by the owner on Dec 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 14
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
[BUG] multipart/form-data Content-Disposition missing #66
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When uploading a file with content type multipart/form-data the Content-Disposition part is missing.
Expected:
-----------------------------31264598498482450412031672804
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
Hello World
-----------------------------31264598498482450412031672804--
Actual:
--3332f21c28498ce486e94b8ec5a48291
Content-Type: application/octet-stream
Hello World
--3332f21c28498ce486e94b8ec5a48291--
openapi-generator version
6.2.1
OpenAPI declaration file content or url
{
"openapi": "3.0.1",
"info": {},
"servers": [],
"security": [],
"paths": {
...,
"/files/{fileContainerId}/payload": {
"post": {
"tags": [
"file"
],
"description": "Upload a new file",
"operationId": "createFile",
"parameters": [
{
"name": "fileContainerId",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"required": [
"file"
],
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "File which you want to upload",
"format": "binary"
}
}
}
}
}
},
"responses": {
"201": {
"description": "created"
},
"404": {
"description": "not found"
}
}
}
},
...
},
"components": {...}
}Generation Details
... generate -i target/openapi/openapi.json -g python -o clients/python
Steps to reproduce
Related issues/PRs
Suggest a fix
Note: duplicated from OpenAPITools/openapi-generator#13887
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working