Skip to content

Commit 4c55e3e

Browse files
authored
Reorganize extensions sections (API Definitions) (#450)
1 parent 0555bd2 commit 4c55e3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1611
-1332
lines changed

fern/docs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,18 @@ redirects:
587587
permanent: true
588588
- source: /learn/fern-definition/:slug*
589589
destination: /learn/api-definitions/ferndef/:slug*
590+
permanent: true
591+
592+
# Redirect old others.mdx extension pages to overview pages
593+
- source: /learn/api-definitions/openapi/extensions/others
594+
destination: /learn/api-definitions/openapi/extensions/overview
595+
permanent: true
596+
- source: /learn/api-definitions/asyncapi/extensions/others
597+
destination: /learn/api-definitions/asyncapi/extensions/overview
598+
permanent: true
599+
- source: /learn/api-definitions/openrpc/extensions/others
600+
destination: /learn/api-definitions/openrpc/extensions/overview
601+
permanent: true
602+
- source: /learn/api-definitions/grpc/extensions/others
603+
destination: /learn/api-definitions/grpc/extensions/overview
590604
permanent: true

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

Lines changed: 131 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
navigation:
22
- section: Overview
33
contents:
4-
- page: What is an API Definition?
4+
- page: What is an API definition?
55
path: ./pages/what-is-an-api-definition.mdx
6-
- page: Project Structure
6+
- page: Project structure
77
path: ./pages/project-structure.mdx
88
- section: OpenAPI
99
collapsed: true
@@ -18,38 +18,57 @@ navigation:
1818
- section: Endpoints
1919
slug: endpoints
2020
contents:
21-
- page: HTTP JSON Endpoints
21+
- page: HTTP JSON endpoints
2222
path: ./openapi-pages/endpoints/rest.mdx
2323
slug: http
2424
- page: Webhooks
2525
path: ./openapi-pages/webhooks.mdx
26-
- page: Multipart Form Uploads
26+
- page: Multipart form uploads
2727
path: ./openapi-pages/endpoints/multipart.mdx
2828
slug: multipart
29-
- page: Server-Sent Events
29+
- page: Server-sent events
3030
path: ./openapi-pages/endpoints/sse.mdx
3131
slug: sse
3232
- section: Extensions
3333
slug: extensions
3434
contents:
35+
- page: Overview
36+
path: ./openapi-pages/extensions/overview.md
37+
- page: API version
38+
path: ./openapi-pages/extensions/api-version.mdx
3539
- page: Audiences
3640
path: ./openapi-pages/extensions/audiences.mdx
37-
- page: SDK Method Names
41+
- page: Availability
42+
path: ./openapi-pages/extensions/availability.mdx
43+
- page: Base path
44+
path: ./openapi-pages/extensions/base-path.mdx
45+
- page: Enum descriptions and names
46+
path: ./openapi-pages/extensions/enums.mdx
47+
- page: Request + response examples
48+
path: ./openapi-pages/extensions/examples.mdx
49+
- page: Global headers
50+
path: ./openapi-pages/extensions/global-headers.mdx
51+
- page: Ignoring elements
52+
path: ./openapi-pages/extensions/ignore.mdx
53+
- page: SDK method names
3854
path: ./openapi-pages/extensions/method-names.mdx
3955
slug: method-names
40-
- page: Parameter Names
56+
- page: Parameter names
4157
path: ./openapi-pages/extensions/parameter-names.mdx
42-
- page: Other
43-
path: ./openapi-pages/extensions/others.mdx
44-
slug: others
45-
- section: Workflow & Automation
58+
- page: Property names
59+
path: ./openapi-pages/extensions/property-names.mdx
60+
- page: Schema names
61+
path: ./openapi-pages/extensions/schema-names.mdx
62+
- page: Server names
63+
path: ./openapi-pages/extensions/server-names.mdx
64+
- section: Workflow & automation
4665
skip-slug: true
4766
contents:
48-
- page: Overlay Customizations
67+
- page: Overlay customizations
4968
path: ./openapi-pages/overrides.mdx
50-
- page: Sync your OpenAPI Specification
69+
- page: Sync your OpenAPI specification
5170
path: ./openapi-pages/automation.mdx
52-
- section: Integrate your Server Framework
71+
- section: Integrate your server framework
5372
slug: frameworks
5473
contents:
5574
- page: FastAPI
@@ -68,34 +87,49 @@ navigation:
6887
- section: Channels
6988
slug: channels
7089
contents:
71-
- page: Publish/Subscribe Operations
90+
- page: Publish/subscribe operations
7291
path: ./asyncapi-pages/channels/pubsub.mdx
7392
slug: pubsub
74-
- page: Message Formats
93+
- page: Message formats
7594
path: ./asyncapi-pages/channels/messages.mdx
7695
slug: messages
77-
- page: Message Bindings
96+
- page: Message bindings
7897
path: ./asyncapi-pages/channels/bindings.mdx
7998
slug: bindings
8099
- section: Extensions
81100
slug: extensions
82101
contents:
102+
- page: Overview
103+
path: ./asyncapi-pages/extensions/overview.md
83104
- page: Audiences
84105
path: ./asyncapi-pages/extensions/audiences.mdx
85-
- page: SDK Method Names
106+
- page: Availability
107+
path: ./asyncapi-pages/extensions/availability.mdx
108+
- page: Error handling
109+
path: ./asyncapi-pages/extensions/error-handling.mdx
110+
- page: Request + response examples
111+
path: ./asyncapi-pages/extensions/examples.mdx
112+
- page: Ignoring elements
113+
path: ./asyncapi-pages/extensions/ignore.mdx
114+
- page: SDK method names
86115
path: ./asyncapi-pages/extensions/method-names.mdx
87116
slug: method-names
88-
- page: Parameter Names
117+
- page: Pagination
118+
path: ./asyncapi-pages/extensions/pagination.mdx
119+
- page: Parameter names
89120
path: ./asyncapi-pages/extensions/parameter-names.mdx
90-
- page: Other
91-
path: ./asyncapi-pages/extensions/others.mdx
92-
slug: others
93-
- section: Workflow & Automation
121+
- page: Retry behavior
122+
path: ./asyncapi-pages/extensions/retry.mdx
123+
- page: Server names
124+
path: ./asyncapi-pages/extensions/server-name.mdx
125+
- page: Streaming operations
126+
path: ./asyncapi-pages/extensions/streaming.mdx
127+
- section: Workflow & automation
94128
skip-slug: true
95129
contents:
96-
- page: Overlay Customizations
130+
- page: Overlay customizations
97131
path: ./asyncapi-pages/overrides.mdx
98-
- page: Sync your AsyncAPI Specification
132+
- page: Sync your AsyncAPI specification
99133
path: ./asyncapi-pages/automation.mdx
100134
- section: OpenRPC
101135
collapsed: true
@@ -110,34 +144,55 @@ navigation:
110144
- section: Methods
111145
slug: methods
112146
contents:
113-
- page: JSON-RPC Methods
147+
- page: JSON-RPC methods
114148
path: ./openrpc-pages/methods/rpc-methods.mdx
115149
slug: rpc-methods
116150
- page: Notifications
117151
path: ./openrpc-pages/methods/notifications.mdx
118152
slug: notifications
119-
- page: Batch Requests
153+
- page: Batch requests
120154
path: ./openrpc-pages/methods/batch.mdx
121155
slug: batch
122156
- section: Extensions
123157
slug: extensions
124158
contents:
159+
- page: Overview
160+
path: ./openrpc-pages/extensions/overview.md
125161
- page: Audiences
126162
path: ./openrpc-pages/extensions/audiences.mdx
127-
- page: SDK Method Names
163+
- page: Availability
164+
path: ./openrpc-pages/extensions/availability.mdx
165+
- page: Base path
166+
path: ./openrpc-pages/extensions/base-path.mdx
167+
- page: Error handling
168+
path: ./openrpc-pages/extensions/error-handling.mdx
169+
- page: Request + response examples
170+
path: ./openrpc-pages/extensions/examples.mdx
171+
- page: Ignoring elements
172+
path: ./openrpc-pages/extensions/ignore.mdx
173+
- page: SDK method names
128174
path: ./openrpc-pages/extensions/method-names.mdx
129175
slug: method-names
130-
- page: Parameter Names
176+
- page: Pagination
177+
path: ./openrpc-pages/extensions/pagination.mdx
178+
- page: Parameter names
131179
path: ./openrpc-pages/extensions/parameter-names.mdx
132-
- page: Other
133-
path: ./openrpc-pages/extensions/others.mdx
134-
slug: others
135-
- section: Workflow & Automation
180+
- page: Retry behavior
181+
path: ./openrpc-pages/extensions/retry.mdx
182+
- page: SDK group names
183+
path: ./openrpc-pages/extensions/sdk-group-name.mdx
184+
- page: Server names
185+
path: ./openrpc-pages/extensions/server-name.mdx
186+
- page: Streaming operations
187+
path: ./openrpc-pages/extensions/streaming.mdx
188+
- page: Timeout settings
189+
path: ./openrpc-pages/extensions/timeout.mdx
190+
- section: Workflow & automation
136191
skip-slug: true
137192
contents:
138-
- page: Overlay Customizations
193+
- page: Overlay customizations
139194
path: ./openrpc-pages/overrides.mdx
140-
- page: Sync your OpenRPC Specification
195+
- page: Sync your OpenRPC specification
141196
path: ./openrpc-pages/automation.mdx
142197
- section: gRPC
143198
collapsed: true
@@ -152,34 +207,59 @@ navigation:
152207
- section: Services
153208
slug: services
154209
contents:
155-
- page: gRPC Services
210+
- page: gRPC services
156211
path: ./grpc-pages/services/grpc-services.mdx
157212
slug: grpc-services
158213
- page: Streaming
159214
path: ./grpc-pages/services/streaming.mdx
160215
slug: streaming
161-
- page: Error Handling
216+
- page: Error handling
162217
path: ./grpc-pages/services/errors.mdx
163218
slug: errors
164219
- section: Extensions
165220
slug: extensions
166221
contents:
222+
- page: Overview
223+
path: ./grpc-pages/extensions/overview.md
167224
- page: Audiences
168225
path: ./grpc-pages/extensions/audiences.mdx
169-
- page: SDK Method Names
226+
- page: Availability
227+
path: ./grpc-pages/extensions/availability.mdx
228+
- page: Base path
229+
path: ./grpc-pages/extensions/base-path.mdx
230+
- page: Error handling
231+
path: ./grpc-pages/extensions/error-handling.mdx
232+
- page: Request + response examples
233+
path: ./grpc-pages/extensions/examples.mdx
234+
- page: Ignoring elements
235+
path: ./grpc-pages/extensions/ignore.mdx
236+
- page: SDK method names
170237
path: ./grpc-pages/extensions/method-names.mdx
171238
slug: method-names
172-
- page: Parameter Names
239+
- page: Pagination
240+
path: ./grpc-pages/extensions/pagination.mdx
241+
- page: Parameter names
173242
path: ./grpc-pages/extensions/parameter-names.mdx
174-
- page: Other
175-
path: ./grpc-pages/extensions/others.mdx
176-
slug: others
177-
- section: Workflow & Automation
243+
- page: Retry behavior
244+
path: ./grpc-pages/extensions/retry.mdx
245+
- page: SDK group names
246+
path: ./grpc-pages/extensions/sdk-group-name.mdx
247+
- page: Server names
248+
path: ./grpc-pages/extensions/server-name.mdx
249+
- page: Streaming operations
250+
path: ./grpc-pages/extensions/streaming.mdx
251+
- page: Timeout settings
252+
path: ./grpc-pages/extensions/timeout.mdx
253+
- page: Union naming
254+
path: ./grpc-pages/extensions/union-naming.mdx
255+
- page: Validation
256+
path: ./grpc-pages/extensions/validation.mdx
257+
- section: Workflow & automation
178258
skip-slug: true
179259
contents:
180-
- page: Overlay Customizations
260+
- page: Overlay customizations
181261
path: ./grpc-pages/overrides.mdx
182-
- page: Sync your gRPC Specification
262+
- page: Sync your gRPC specification
183263
path: ./grpc-pages/automation.mdx
184264
- section: Fern Definition
185265
collapsed: true
@@ -195,16 +275,16 @@ navigation:
195275
contents:
196276
- page: Overview
197277
path: ./ferndef-pages/endpoints.mdx
198-
- page: HTTP JSON Endpoints
278+
- page: HTTP JSON endpoints
199279
path: ./ferndef-pages/endpoints/rest.mdx
200280
slug: http
201-
- page: Multipart Form Uploads
281+
- page: Multipart form uploads
202282
path: ./ferndef-pages/endpoints/multipart.mdx
203283
slug: multipart
204284
- page: Bytes
205285
path: ./ferndef-pages/endpoints/bytes.mdx
206286
slug: bytes
207-
- page: Server-Sent Events
287+
- page: Server-sent events
208288
path: ./ferndef-pages/endpoints/sse.mdx
209289
slug: sse
210290
- section: Advanced
@@ -225,14 +305,14 @@ navigation:
225305
path: ./ferndef-pages/audiences.mdx
226306
- page: Availability
227307
path: ./ferndef-pages/availability.mdx
228-
- section: api.yml Reference
308+
- section: api.yml reference
229309
slug: api-yml
230310
contents:
231311
- page: Overview
232312
path: ./ferndef-pages/api-yml/overview.mdx
233313
- page: Environments
234314
path: ./ferndef-pages/api-yml/environments.mdx
235-
- page: Global Headers
315+
- page: Global headers
236316
path: ./ferndef-pages/api-yml/global-configuration.mdx
237317
- page: Errors
238318
path: ./ferndef-pages/api-yml/errors.mdx
@@ -241,7 +321,7 @@ navigation:
241321
contents:
242322
- page: Packages
243323
path: ./ferndef-pages/packages.mdx
244-
- page: Depending on Other APIs
324+
- page: Depending on other APIs
245325
path: ./ferndef-pages/depending-on-other-apis.mdx
246326
- page: Export to OpenAPI
247327
slug: export-openapi
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Availability
3+
description: Mark features as available in specific SDK versions using `x-fern-availability` extension
4+
---
5+
6+
Mark features as available in specific SDK versions:
7+
8+
```yaml title="asyncapi.yml" {6-8}
9+
operations:
10+
newFeature:
11+
action: send
12+
channel:
13+
$ref: '#/channels/new~1feature'
14+
x-fern-availability:
15+
status: beta
16+
message: "This feature is in beta and may change"
17+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Error handling
3+
description: Configure error handling for operations using `x-fern-error-handling` extension
4+
---
5+
6+
Configure error handling for operations:
7+
8+
```yaml title="asyncapi.yml" {6-16}
9+
operations:
10+
sendMessage:
11+
action: send
12+
channel:
13+
$ref: '#/channels/messages'
14+
x-fern-error-handling:
15+
error_schema:
16+
$ref: '#/components/schemas/MessageError'
17+
error_status_codes:
18+
- 400
19+
- 429
20+
- 500
21+
retry_on_errors:
22+
- 429
23+
- 500
24+
```

0 commit comments

Comments
 (0)