Open
Description
Description
In OpenAPI 3.0 we can describe the schema for files uploaded directly or as multipart:
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
orderId:
type: integer
userId:
type: integer
file:
type: string
format: binary
The binary format indicates a File
type object. However, the typescript interface generated by the library sets this property to string
:
{
...
/** Format: binary */
file: string
}
Proposal
The type of the property should be set to File
:
{
...
/** Format: binary */
file: File
}
NOTE: For reference the openapi-generator for typescript correctly sets the type to File
but doesn't support OpenAPI 3.0
Checklist
- I’m willing to open a PR for this (see CONTRIBUTING.md)
Similar to #1123