Fern Definition

Availability

You can add availability to an endpoint, type, or property within your Fern Definition.

Availability can be:

  • in-development which means it is being worked on; will show a beta tag
  • pre-release which means it is available; will show a beta tag
  • deprecated which means it will be removed in the future; will show a deprecated tag
  • generally-available which means it is stable and available for use; will not show a tag

By default, all endpoints, types, and properties are generally-available.

Endpoint

1
2
3
4
5
6
7
8
9
10
11
service:
  auth: false
  base-path: /movies
  endpoints:
    createMovie:
+     availability: deprecated
      docs: Add a movie to the database
      method: POST
      path: /create-movie
      request: CreateMovieRequest
      response: MovieId

In Fern Docs, this will look like: endpoint deprecated

1
2
3
4
5
6
7
8
9
10
11
service:
  auth: false
  base-path: /movies
  endpoints:
    createMovie:
+     availability: beta
      docs: Add a movie to the database
      method: POST
      path: /create-movie
      request: CreateMovieRequest
      response: MovieId

In Fern Docs, this will look like: endpoint beta

Type

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 Movie:
    properties:
      id: MovieId
      title: string
      rating:
        type: double
        docs: The rating scale out of ten stars
      whereToWatch: 
        type: WhereToWatch
+       availability: pre-release

  WhereToWatch: 
    enum:
      - theater
      - netflix
      - hulu
      - prime_video

In Fern Docs, this will look like: type pre-release

Property

1
2
3
4
5
6
7
8
  Movie:
    properties:
      id: MovieId
      title: string
      rating:
+       availability: deprecated
        type: double
        docs: The rating scale out of ten stars

In Fern Docs, this will look like: property deprecated