Description
A schema which contains a path with the following can not be validated with openapi-core.
This relates to #231
summary: multipart test
requestBody:
content:
multipart/form-data:
schema:
type: object # ---This is the issue.
properties:
file:
type: string
format: binary
name:
type: string
It can be resolved by not using type: object
on the commented line. But https://swagger.io/docs/specification/describing-request-body/multipart-requests/ and https://swagger.io/docs/specification/describing-request-body/file-upload/ both give examples of schemas with it.
While it's not a huge deal to workaround, I feel like the library should be able to handle this.
Edit: It seems that without the object type, the validation just does not work. (I tried using an enum in the properties, and they are not validated).
Does that mean there is only json support at the moment?
As a sidenote, the resulting "body" from validating formdata is quite raw (just a bytestring), I wonder if this could return something that's parsed a little bit more, but I do realise that multipart formdata is not the easiest thing.