Fern's API reference docs seem to assume that all 2xx status codes are equivalent to 200. Regardless of which 2xx code is defined in the OpenAPI spec, API reference always displays it as "200 Successful".
This can confuse API consumers: if they receive e.g. 201 but the docs say 200, they might wonder why docs don't match the implementation and whether it's a bug in docs or in the API itself.
Information to Reproduce
CLI Version
0.44.11, but goes back to 0.31.14 so most likely all versions.
Actual Behavior
All 2xx response status codes are displayed as 200:
Expected Behavior
API reference should display the exact HTTP status code defined in the OpenAPI document. E.g. display 201 as "201 Created", 202 as "202 Accepted", etc.
API Definition
openapi: 3.1.0
info:
title: Non-200 2xx response codes
version: 1.0.0
servers:
- url: https://httpbin.org/anything
paths:
/foos:
post:
summary: Create a foo
responses:
'201':
description: A foo has been successfully created
content:
application/json:
schema:
type: string
/smth:
post:
summary: Do something async
responses:
'202':
description: Request accepted. Poll the resource in the `Location` header to await processing completion.
content:
application/json:
schema:
type: string
Additional notes
OpenAPI 3.0+ also supports 2XX as a catch-all code for all 2xx responses, e.g. if they all use the same schema.
Describe the Bug
Fern's API reference docs seem to assume that all 2xx status codes are equivalent to 200. Regardless of which 2xx code is defined in the OpenAPI spec, API reference always displays it as "200 Successful".
This can confuse API consumers: if they receive e.g. 201 but the docs say 200, they might wonder why docs don't match the implementation and whether it's a bug in docs or in the API itself.
Information to Reproduce
CLI Version
0.44.11, but goes back to 0.31.14 so most likely all versions.
Actual Behavior
All 2xx response status codes are displayed as 200:
Expected Behavior
API reference should display the exact HTTP status code defined in the OpenAPI document. E.g. display 201 as "201 Created", 202 as "202 Accepted", etc.
API Definition
Additional notes
OpenAPI 3.0+ also supports
2XX
as a catch-all code for all 2xx responses, e.g. if they all use the same schema.