Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No content-type is added in the Request Body #5577

Closed
pandoly2 opened this issue Aug 29, 2019 · 1 comment
Closed

No content-type is added in the Request Body #5577

pandoly2 opened this issue Aug 29, 2019 · 1 comment

Comments

@pandoly2
Copy link

OS: [macOS]
Browser: [chrome]
Version: [latest]
Method of installation: [npm]
Swagger-UI version: [3.23.4]
Swagger/OpenAPI version: [OpenAPI 3.0]


I tested multipart/form-data.
However, swagger 3.0 is multipart/form-data encoding does not work.

I have completed all the settings and sent a request, but I could not set the content-type: application / json.

The request I sent is:

``
[ API 3.0 ]
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties: # Request parts
                id:
                  type: string
                  format: uuid
                address:
                  type: object
                  properties:
                    street:
                      type: string
                    city:
                      type: string
                profileImage:
                  type: string
                  format: base64
            encoding: 
              address: 
                contentType: application/json


[Http - Form Data]
------WebKitFormBoundaryg4ZD9ktAPUfzw09p
Content-Disposition: form-data; name="id"

123
------WebKitFormBoundaryg4ZD9ktAPUfzw09p
Content-Disposition: form-data; name="address"
  **<---------------------------- not added content-type: application/json** 
{
  "street": "111",
  "city": "222"
}
------WebKitFormBoundaryg4ZD9ktAPUfzw09p
Content-Disposition: form-data; name="profileImage"; filename="fina.zip"
Content-Type: application/x-zip-compressed


------WebKitFormBoundaryg4ZD9ktAPUfzw09p--
@hkosova
Copy link
Contributor

hkosova commented Aug 29, 2019

Duplicate of #4826.

@hkosova hkosova closed this as completed Aug 29, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants