Skip to content
Discussion options

You must be logged in to vote

This is not an answer to your question, but rather an observation for the purpose of addressing this problem in the future: the problem is that for requests, "requestBody" is split out as a property of its own, allowing "required":false to be used when it is relevant, but there is nowhere to specify that a response body is optional because its "content" property is at the same level as the response headers. One possible solution is to add a "responseBody" underneath, which could have a "required" property, adjacent to "content".


As a potential stopgap solution, you could perhaps do this:

...
  responses:
    "201":
      headers:
        ...
      content:
        application/json:
     …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@danielknell
Comment options

@handrews
Comment options

@danielknell
Comment options

@karenetheridge
Comment options

@handrews
Comment options

Answer selected by danielknell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants