Skip to content

Commit b33dd73

Browse files
committed
make asynapi collapseable, reorder accordions according to left nav
1 parent 5e5f355 commit b33dd73

File tree

2 files changed

+59
-58
lines changed

2 files changed

+59
-58
lines changed

fern/products/api-def/api-def.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ navigation:
5555
path: ./openapi-pages/server-frameworks/fastapi.mdx
5656
slug: fastapi
5757
- section: AsyncAPI
58+
collapsed: true
5859
slug: asyncapi
5960
contents:
6061
- page: Overview

fern/products/api-def/pages/what-is-an-api-definition.mdx

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -151,64 +151,6 @@ Fern integrates with several API definition formats:
151151
description: The userId for the sender of the message
152152
```
153153
154-
</Accordion>
155-
<Accordion
156-
title="Fern Definition (REST, Webhook, & WebSocket APIs)"
157-
>
158-
The Fern Definition is our take on a simpler API definition format. It is designed with **best-practices**,
159-
supports **both RESTful and event-driven APIs**, and is optimized for **SDK generation**.
160-
161-
<Note>
162-
The Fern Definition is inspired from internal API Definition formats built at companies like
163-
[Amazon](https://smithy.io/2.0/index.html), [Google](https://grpc.io/), [Palantir](https://blog.palantir.com/introducing-conjure-palantirs-toolchain-for-http-json-apis-2175ec172d32),
164-
Twilio and Stripe. These companies **rejected** OpenAPI and built their own version.
165-
</Note>
166-
167-
Check out an example Fern Definition below:
168-
169-
```yaml maxLines={0}
170-
types:
171-
MovieId: string
172-
173-
Movie:
174-
properties:
175-
id: MovieId
176-
title: string
177-
rating:
178-
type: double
179-
docs: The rating scale is one to five stars
180-
181-
CreateMovieRequest:
182-
properties:
183-
title: string
184-
rating: double
185-
186-
service:
187-
auth: false
188-
base-path: /movies
189-
endpoints:
190-
createMovie:
191-
docs: Add a movie to the database
192-
method: POST
193-
path: /create-movie
194-
request: CreateMovieRequest
195-
response: MovieId
196-
197-
getMovie:
198-
method: GET
199-
path: /{movieId}
200-
path-parameters:
201-
movieId: MovieId
202-
response: Movie
203-
errors:
204-
- MovieDoesNotExistError
205-
206-
errors:
207-
MovieDoesNotExistError:
208-
status-code: 404
209-
type: MovieId
210-
```
211-
212154
</Accordion>
213155
<Accordion
214156
title="OpenRPC (JSON-RPC APIs)"
@@ -318,6 +260,64 @@ Fern integrates with several API definition formats:
318260
}
319261
```
320262
</Accordion>
263+
<Accordion
264+
title="Fern Definition (REST, Webhook, & WebSocket APIs)"
265+
>
266+
The Fern Definition is our take on a simpler API definition format. It is designed with **best-practices**,
267+
supports **both RESTful and event-driven APIs**, and is optimized for **SDK generation**.
268+
269+
<Note>
270+
The Fern Definition is inspired from internal API Definition formats built at companies like
271+
[Amazon](https://smithy.io/2.0/index.html), [Google](https://grpc.io/), [Palantir](https://blog.palantir.com/introducing-conjure-palantirs-toolchain-for-http-json-apis-2175ec172d32),
272+
Twilio and Stripe. These companies **rejected** OpenAPI and built their own version.
273+
</Note>
274+
275+
Check out an example Fern Definition below:
276+
277+
```yaml maxLines={0}
278+
types:
279+
MovieId: string
280+
281+
Movie:
282+
properties:
283+
id: MovieId
284+
title: string
285+
rating:
286+
type: double
287+
docs: The rating scale is one to five stars
288+
289+
CreateMovieRequest:
290+
properties:
291+
title: string
292+
rating: double
293+
294+
service:
295+
auth: false
296+
base-path: /movies
297+
endpoints:
298+
createMovie:
299+
docs: Add a movie to the database
300+
method: POST
301+
path: /create-movie
302+
request: CreateMovieRequest
303+
response: MovieId
304+
305+
getMovie:
306+
method: GET
307+
path: /{movieId}
308+
path-parameters:
309+
movieId: MovieId
310+
response: Movie
311+
errors:
312+
- MovieDoesNotExistError
313+
314+
errors:
315+
MovieDoesNotExistError:
316+
status-code: 404
317+
type: MovieId
318+
```
319+
320+
</Accordion>
321321
</AccordionGroup>
322322
323323
## Why create an API definition?

0 commit comments

Comments
 (0)