fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
MIT License
2.45k stars 118 forks source link

(fix, openapi): fall back to default status code if none provided #3834

Closed dsinghvi closed 3 weeks ago

dsinghvi commented 3 weeks ago

The OpenAPI parser now handles the default status code

In OpenAPI, you can use default to cover all unlisted status codes. The example below shows how default can be used as an error schema.

Screenshot 2024-06-11 at 3 43 49 PM

If you specify default with no other status codes, its technically both a success + error schema. This PR handles this case.