Redoc: 204 with empty body is missing from response samples

Created on 22 May 2019  路  4Comments  路  Source: Redocly/redoc

I see 204 in Responses but not in Response Samples on the right.

delete:
  summary: Delete a user
  operationId: deleteUser
  tags:
    - user
  parameters:
    - name: id
      in: path
      required: true
      description: The id of the user to delete
      schema:
        type: string
  responses:
    '204':
      description: Empty response when the user is deleted

Most helpful comment

The response is shown in the corresponding "Responses" chapter, but not shown in the examples (as there's no example). I think this is really expected behaviour. You shouldn't base your assumptions on examples, but on the actual specification. This could be a new feature, but I would not see this as a bug.

All 4 comments

I believe this is probably expected behavior since a 204 (by definition) has no content there's no sample response to show.

It's still a response with empty body.
Excluding it from response samples make it look like it's not a possible response.

The response is shown in the corresponding "Responses" chapter, but not shown in the examples (as there's no example). I think this is really expected behaviour. You shouldn't base your assumptions on examples, but on the actual specification. This could be a new feature, but I would not see this as a bug.

@m-mohr is correct. There is no example. The response is shown in the middle panel.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karussell picture karussell  路  3Comments

skllcrn picture skllcrn  路  3Comments

bmarwell picture bmarwell  路  3Comments

jaroslawr picture jaroslawr  路  3Comments

gauravmokhasi picture gauravmokhasi  路  4Comments