Skip to navigation

0.41.1

(feat): Adds a V2 configuration for the api block that is more flexible and allows OpenAPI users to consume Fern Definition features.

For example, now you can override environments directly in the api configuration:

api:
environments:
Production: https://prod.com
Staging: https://staging.com
specs:
- openapi: path/to/openapi
overrides: path/to/overrides

If you want to define, multi-url environments, those can be done by configuring the following generators.yml:

api:
environments:
Production:
urls:
api: https://api.com
auth: https://auth.com
Staging:
api: https://stagingapi.com
auth: https://stagingauth.com
specs:
- openapi: path/to/openapi
overrides: path/to/overrides

Note that you will need to use the x-fern-server-name annotation on each endpoint to assign it to a relevant server. For example,

paths:
/api/users/:
get:
x-fern-server-name: api
/token:
post:
x-fern-server-name: auth

0.41.0

(feat): Adds generic object declarations to the fern definition. Now we can define generics and use them in alias declarations to minimize code duplication:

types:
`GenericTest<T>`:
properties:
value: T
other-value: string
GenericApplication:
type: `GenericTest<string>`

More information can be found here: https://buildwithfern.com/learn/api-definition/fern/types#generics.