Skip to content
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

415 Unsupported Media Type when posting form data from Postman #149

Closed
fmarkwong opened this issue Dec 21, 2022 · 4 comments
Closed

415 Unsupported Media Type when posting form data from Postman #149

fmarkwong opened this issue Dec 21, 2022 · 4 comments

Comments

@fmarkwong
Copy link

fmarkwong commented Dec 21, 2022

Hi there @ahx ,

I have this spec:

paths:
  /api/v1/test:
    post:
      summary: test
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              properties:
                id:
                  type: string
                  format: uuid

And when I try to do a POST with form-data on Postman, I get

{
    "errors": [
        {
            "status": "415",
            "title": "Unsupported Media Type"
        }
    ]
}

Is is my Postman request body:
Screen Shot 2022-12-20 at 9 45 44 PM

and headers:

Screen Shot 2022-12-20 at 9 47 01 PM

Any idea why the response is unsupported Media Type?

thanks so much for this gem!

@ahx
Copy link
Owner

ahx commented Dec 21, 2022

hi @fmarkwong currently openapi_first does not support form-data. But I think I can add add it soon. 👷🏼

@fmarkwong
Copy link
Author

@ahx that would be fantastic! Thank you!

@ahx
Copy link
Owner

ahx commented Dec 30, 2022

@fmarkwong form-data should work with #152. Do you mind testing if it works for you?

@ahx
Copy link
Owner

ahx commented Mar 6, 2023

Released in 0.21.0

@ahx ahx closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants