I have a multipart/form-data POST in an API endpoint which takes some key/value strings, and a file upload via the key files
.
I believe I have defined it correctly in OpenAPI;
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"properties": {
"file": {
"type": "array",
"items": {
"type": "string",
"format": "binary"
}
},
"myKey1": {
"type": "string"
},
"myKey2": {
"type": "string"
}
}
},
"examples": {
"value": ?
}
}
}
},
However, I am unsure how I can describe an example for a multipart/form-data in the examples
field.
I assume I don't need to represent the file (although that would be a bonus) but just the myKey1
and myKey2
keys and values.