-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
multipart/form-data - value must be an object #1169
Comments
removing the Is it something I'm doing incorrectly or should I investigate why the middleware isn't considering this a valid object? |
issue with kin-openapi, closing. |
I am facing the same problem. Can you elaborate a bit how kin-openapi is connected to this issue? Also, skipping the validation is not really an option for me. Is there something I can change without skipping the validator? |
@lukasbash |
@Ol1BoT Skipper: func(ctx echo.Context) bool {
cts := ctx.Request().Header["Content-Type"]
return lo.SomeBy(cts, func(ct string) bool {
return strings.Contains(ct, "multipart/form-data")
})
}, I get an error This is my API requestBody content: multipart/form-data:
schema:
type: object
required:
- "file"
properties:
file:
type: string
format: binary
encoding:
file:
contentType: image/png, image/jpeg EDIT: Never mind as I forgot to add the image body decoders. Thank you so much for the support! |
version:
v1.13.0
When I POST a multipart/form I get the following:
code=400, message=request body has an error: doesn't match schema: value must be an object, internal=request body has an error: doesn't match schema: value must be an object
I've clipped off the rest for brevity.
The yaml looks as follows:
and the cURL command i'm using is
I seem to be following the openapi spec to a T, I also added in the following:
I don't think the
application/zip
is necessary but I've included it anyway.I've been using #514 as a reference but I've seem to run out of things to try.
The text was updated successfully, but these errors were encountered: