-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding attribute is not respected on the request #5356
Comments
I have the same issue, please solve this. |
Any ETA on when will this be fixed? |
PRs welcome. |
Same issue, please solve it |
Have same issue. |
Is there a workaround? |
Same issue here |
Hello, Same here. |
Same problem here :( |
Refer this workaround: |
We are having same problem. Has this been resolved in SwaggerHub Cloud Enterprise ?? |
Hi everybody, This issue has been addressed upstream in swagger-api/swagger-js#3078 OpenAPI 3.x.y definition: {
"openapi": "3.0.0",
"paths": {
"/upload/": {
"post": {
"tags": [
"upload"
],
"operationId": "upload",
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"options": {
"type": "object",
"properties": {
"some_array": {
"type": "array",
"items": {
"type": "string"
}
},
"max_bar": {
"type": "integer",
"default": 300
}
}
}
}
},
"encoding": {
"options": {
"contentType": "application/json; charset=utf-8"
}
}
}
}
}
}
}
}
} Here is how the POST / HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="options"
{"some_array":["string"],"max_bar":300} Here is how the POST / HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="options"; filename="blob"
Content-Type: application/json
{"some_array":["string"],"max_bar":300} Every boundary now contains specific |
This change affects building requests from OpenAPI 3.x.y definitions. Refs swagger-api/swagger-ui#5356 Refs swagger-api/swagger-ui#4826 Refs #2954
Addressed by #9105 |
Q&A
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
To reproduce...
Steps to reproduce the behavior:
Expected behavior
The payload should be
Check that the profile attribute contains it's content-type as "application/json".
The text was updated successfully, but these errors were encountered: