Hi all.
I have tried different combination of parameter types but I can't achieve
to document the real method behavior.
The POST needs two required custom headers ("docs-tenant" and "docs-meta")
and the entirely body-content is just a file (jpg,pdf,xml, whatever); the
content-type of the request should be the MIME-type of the request content.
The follow is my "last-try"
"post": {
"tags": [
"Documents"
],
"operationId": "Create",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"parameters": [
{
"name": "docs-tenant",
"in": "header",
"required": true,
"type": "string"
},
{
"name": "docs-meta",
"in": "header",
"required": true,
"type": "string"
},
{
"name": "document",
"in": "body",
"required": true,
"schema": {
"type": "file"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/DocumentMetadata"
}
},
"201": {
"description": "Created"
},
"400": {
"description": "BadRequest"
},
"409": {
"description": "Conflict"
}
},
"deprecated": false
}
Is there a way to document the behavior I'm having in the API ?
Is there a way to document something closer without incur in a schema
validation error ?
Thanks in advance.
--
Fabio
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.