Fern's API reference currently displays 2xx responses only if they have content, i.e. a response body. But HTTP responses don't necessarily have a body.
A typical example is 204 No Content commonly returned by DELETE requests (see the sample spec below). 200 responses also may not have a body depending on the use case.
Information to Reproduce
CLI Version
0.44.11, but goes back to 0.31.14 so most likely all versions.
Actual Behavior
2xx responses without content are not displayed in the API reference.
Expected Behavior
API reference should always show the response code returned. Something like this:
API Definition
openapi: 3.1.0
info:
title: Responses without a body
version: 1.0.0
servers:
- url: https://httpbin.org/anything
paths:
/foos:
delete:
summary: Delete a foo
responses:
'204':
description: This one is displayed
content:
application/json: {}
/bars:
delete:
summary: Delete a bar
responses:
'204':
description: This one is NOT displayed
Additional Context
4xx and 5xx responses are not affected by this limitation, they are always displayed regardless of whether or not they have content (assuming display-errors: true config is used.)
Describe the Bug
Fern's API reference currently displays 2xx responses only if they have
content
, i.e. a response body. But HTTP responses don't necessarily have a body.A typical example is 204 No Content commonly returned by DELETE requests (see the sample spec below). 200 responses also may not have a body depending on the use case.
Information to Reproduce
CLI Version
0.44.11, but goes back to 0.31.14 so most likely all versions.
Actual Behavior
2xx responses without
content
are not displayed in the API reference.Expected Behavior
API reference should always show the response code returned. Something like this:
API Definition
Additional Context
4xx and 5xx responses are not affected by this limitation, they are always displayed regardless of whether or not they have content (assuming
display-errors: true
config is used.)