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:

1api:
2 environments:
3 Production: https://prod.com
4 Staging: https://staging.com
5 specs:
6 - openapi: path/to/openapi
7 overrides: path/to/overrides

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

1api:
2 environments:
3 Production:
4 urls:
5 api: https://api.com
6 auth: https://auth.com
7 Staging:
8 api: https://stagingapi.com
9 auth: https://stagingauth.com
10 specs:
11 - openapi: path/to/openapi
12 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,

1paths:
2 /api/users/:
3 get:
4 x-fern-server-name: api
5 /token:
6 post:
7 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:

1types:
2 GenericTest<T>:
3 properties:
4 value: T
5 other-value: string
6
7 GenericApplication:
8 type: GenericTest<string>

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