vmcg105
8 years agoNew Contributor
Cannot add "content" to the "responses"
When I try to the "content" under "responses" I get the error: responses['200'] should NOT have additional properties additionalProperty: content, description Even though I copied the code st...
- 8 years ago
Hi vmcg105,
Is your spec in the OpenAPI 3.0 or Swagger 2.0 format?
If you use OpenAPI 3.0, add quotes around "200" and make sure description and content have the indentation.
If it's Swagger 2.0, use the following instead. See Describing Responses for more examples.
paths: /something: get: produces: - application/json responses: 200: description: "Got form" schema: type: object properties: id: type: integer description: The user ID.