@lukoweb/apitogo 0.2.54 → 0.2.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.js +2196 -1352
- package/dist/declarations/cli/platform/client/platform-api.d.ts +29 -0
- package/dist/declarations/cli/platform/helpers/platform-plan-catalog.d.ts +6 -0
- package/dist/declarations/config/validators/ZudokuConfig.d.ts +2 -0
- package/dist/declarations/lib/authentication/providers/openid.d.ts +2 -1
- package/dist/declarations/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/flat-config.d.ts +1 -0
- package/docs/cli/commands.md +50 -32
- package/docs/cli/go-live.md +66 -93
- package/docs/cli/overview.md +18 -17
- package/docs/cli/setup.md +130 -141
- package/docs/cli/shape.md +94 -11
- package/docs/cli/walkthrough.md +1 -1
- package/docs/components/slot.mdx +116 -119
- package/docs/configuration/api-reference.md +98 -397
- package/docs/configuration/authentication.md +118 -159
- package/docs/configuration/footer.mdx +89 -118
- package/docs/configuration/make-config.mdx +2 -2
- package/docs/configuration/overview.md +97 -166
- package/docs/configuration/plans.md +100 -110
- package/docs/configuration/portal.md +116 -0
- package/docs/customization/colors-theme.mdx +255 -278
- package/docs/customization/fonts.md +105 -110
- package/docs/customization/landing-page.md +189 -188
- package/docs/deploy/apitogo.md +13 -17
- package/docs/deployment.md +15 -9
- package/docs/guides/stripe-setup.mdx +123 -0
- package/docs/markdown/frontmatter.md +172 -173
- package/docs/mcp/go-live.md +100 -100
- package/docs/mcp/overview.md +76 -76
- package/docs/quickstart.md +88 -72
- package/docs/writing.mdx +68 -72
- package/package.json +1 -1
- package/src/config/v2/docs-navigation.ts +7 -2
- package/src/config/v2/index.ts +1 -0
- package/src/config/v2/resolve.ts +28 -0
- package/src/config/v2/rules.ts +32 -1
- package/src/config/v2/schema.ts +9 -0
- package/src/config/v2/services.ts +90 -15
- package/src/config/v2/starter-landing.ts +41 -0
- package/src/config/v2/wrapper.ts +141 -7
- package/src/config/validators/ZudokuConfig.ts +794 -792
- package/src/lib/authentication/providers/openid.tsx +6 -1
- package/src/lib/plugins/markdown/index.tsx +86 -82
- package/src/vite/dev-server.ts +9 -1
- package/src/vite/dev-ssr-config.ts +32 -0
- package/src/vite/plugin-config.ts +4 -2
- package/src/vite/plugin-docs.ts +213 -205
- package/docs/concepts/auth-provider-api-identities.md +0 -105
- package/docs/configuration/ai-assistants.md +0 -65
- package/docs/configuration/api-catalog.md +0 -109
- package/docs/configuration/authentication-auth0.md +0 -181
- package/docs/configuration/authentication-azure-ad.md +0 -245
- package/docs/configuration/authentication-clerk.md +0 -117
- package/docs/configuration/authentication-firebase.md +0 -69
- package/docs/configuration/authentication-pingfederate.md +0 -143
- package/docs/configuration/authentication-supabase.md +0 -233
- package/docs/configuration/build-configuration.mdx +0 -147
- package/docs/configuration/docs.md +0 -282
- package/docs/configuration/llms.md +0 -90
- package/docs/configuration/manifest.md +0 -129
- package/docs/configuration/navigation.mdx +0 -415
- package/docs/configuration/protected-routes.md +0 -150
- package/docs/configuration/search.md +0 -164
- package/docs/configuration/sentry.mdx +0 -44
- package/docs/configuration/site.md +0 -124
- package/docs/configuration/slots.mdx +0 -125
- package/docs/configuration/vite-config.md +0 -18
- package/docs/custom-plugins.md +0 -285
- package/docs/deploy/apache-nginx.md +0 -41
- package/docs/deploy/cloudflare-pages.md +0 -74
- package/docs/deploy/direct-upload.md +0 -17
- package/docs/deploy/github-pages.md +0 -49
- package/docs/deploy/vercel.md +0 -101
- package/docs/extending/events.md +0 -124
- package/docs/guides/environment-variables.md +0 -94
- package/docs/guides/managing-api-keys-and-identities.md +0 -89
- package/docs/guides/navigation-rules.mdx +0 -203
- package/docs/guides/processors.mdx +0 -234
- package/docs/guides/transforming-examples.md +0 -156
- package/docs/guides/using-multiple-apis.md +0 -87
- package/docs/plugins.md +0 -24
|
@@ -1,397 +1,98 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: API
|
|
3
|
-
sidebar_icon:
|
|
4
|
-
description:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
input: "./openapi-v2.json",
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
path: "v1",
|
|
103
|
-
label: "Version 1.0",
|
|
104
|
-
input: "./openapi-v1.json",
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
path: "/api",
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
You can specify:
|
|
113
|
-
|
|
114
|
-
- `input`: Path to the OpenAPI document (required)
|
|
115
|
-
- `path`: Version identifier used in the URL path (e.g., `/api/v2`)
|
|
116
|
-
- `label`: Optional display name for the version selector
|
|
117
|
-
|
|
118
|
-
You can also mix strings and objects in the array - use strings for defaults and objects when you
|
|
119
|
-
need to customize:
|
|
120
|
-
|
|
121
|
-
```ts title=config
|
|
122
|
-
const config = {
|
|
123
|
-
apis: {
|
|
124
|
-
type: "file",
|
|
125
|
-
input: [
|
|
126
|
-
{
|
|
127
|
-
path: "latest",
|
|
128
|
-
label: "Latest (2.0)",
|
|
129
|
-
input: "./openapi-v2.json",
|
|
130
|
-
},
|
|
131
|
-
"./openapi-v1.json", // Uses info.version from the document
|
|
132
|
-
],
|
|
133
|
-
path: "/api",
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Splitting a Single Schema
|
|
139
|
-
|
|
140
|
-
If you have one schema containing multiple API versions (e.g. `/v1/...` and `/v2/...` paths), you
|
|
141
|
-
can split it into separate versions by appending query parameters to the input path:
|
|
142
|
-
|
|
143
|
-
```ts title=config
|
|
144
|
-
const config = {
|
|
145
|
-
apis: {
|
|
146
|
-
type: "file",
|
|
147
|
-
input: ["openapi.json?prefix=/v2", "openapi.json?prefix=/v1"],
|
|
148
|
-
path: "/api",
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
The query parameters are passed to [schema processors](../guides/processors) via the `params`
|
|
154
|
-
argument, where you can filter the schema based on their values. See
|
|
155
|
-
[Using Query Parameters to Split Schemas](../guides/processors#using-query-parameters-to-split-schemas)
|
|
156
|
-
for a full example.
|
|
157
|
-
|
|
158
|
-
### URL-based Versioning
|
|
159
|
-
|
|
160
|
-
When using `type: "url"`, you can provide an array of version configurations. Since URL-based
|
|
161
|
-
schemas cannot be processed at build time, you must explicitly specify the version identifier and
|
|
162
|
-
optional label:
|
|
163
|
-
|
|
164
|
-
```ts title=config
|
|
165
|
-
const config = {
|
|
166
|
-
apis: {
|
|
167
|
-
type: "url",
|
|
168
|
-
input: [
|
|
169
|
-
{
|
|
170
|
-
path: "v2",
|
|
171
|
-
label: "Version 2.0",
|
|
172
|
-
input: "https://api.example.com/openapi-v2.json",
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
path: "v1",
|
|
176
|
-
label: "Version 1.0",
|
|
177
|
-
input: "https://api.example.com/openapi-v1.json",
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
path: "/api",
|
|
181
|
-
},
|
|
182
|
-
};
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
Each URL version object requires:
|
|
186
|
-
|
|
187
|
-
- `path`: Version identifier used in the URL path (e.g., `/api/v2`)
|
|
188
|
-
- `input`: URL to the OpenAPI document
|
|
189
|
-
- `label`: Optional display name for the version selector (defaults to `path` if not provided)
|
|
190
|
-
|
|
191
|
-
## Options
|
|
192
|
-
|
|
193
|
-
The `options` field allows you to customize the API reference behavior:
|
|
194
|
-
|
|
195
|
-
```ts title=config
|
|
196
|
-
const config = {
|
|
197
|
-
apis: {
|
|
198
|
-
type: "file",
|
|
199
|
-
input: "./openapi.json",
|
|
200
|
-
path: "/api",
|
|
201
|
-
options: {
|
|
202
|
-
examplesLanguage: "shell", // Default language for code examples
|
|
203
|
-
supportedLanguages: [
|
|
204
|
-
{ label: "cURL", language: "shell" },
|
|
205
|
-
{ label: "JavaScript", language: "javascript" },
|
|
206
|
-
],
|
|
207
|
-
disablePlayground: false, // Disable the interactive API playground
|
|
208
|
-
disableSidecar: false, // Disable the sidecar completely
|
|
209
|
-
showVersionSelect: "if-available", // Control version selector visibility
|
|
210
|
-
expandAllTags: true, // Control initial expanded state of tag categories
|
|
211
|
-
showInfoPage: true, // Show API information page as the index route
|
|
212
|
-
schemaDownload: {
|
|
213
|
-
enabled: true, // Enable schema download button
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Available options:
|
|
221
|
-
|
|
222
|
-
- `examplesLanguage`: Set default language for code examples
|
|
223
|
-
- `supportedLanguages`: Array of language options for code examples. Each option has `label`
|
|
224
|
-
(display name) and `language` (code identifier)
|
|
225
|
-
- `disablePlayground`: Disable the interactive API playground globally
|
|
226
|
-
- `disableSidecar`: Disable the sidecar panel completely
|
|
227
|
-
- `showVersionSelect`: Control version selector visibility
|
|
228
|
-
- `"if-available"`: Show version selector only when multiple versions exist (default)
|
|
229
|
-
- `"always"`: Always show version selector (disabled if only one version)
|
|
230
|
-
- `"hide"`: Never show version selector
|
|
231
|
-
- `expandAllTags`: Control initial expanded state of tag categories (default: `true`)
|
|
232
|
-
- `showInfoPage`: Show the API information page as the index route (default: `true`). When disabled,
|
|
233
|
-
navigating to the API root redirects to the first tag instead
|
|
234
|
-
- `schemaDownload`: Enable schema download functionality. When enabled, displays a button allowing
|
|
235
|
-
users to download the OpenAPI schema, copy it to clipboard, or open in a new tab.
|
|
236
|
-
- `enabled`: Enable or disable the schema download button
|
|
237
|
-
- `transformExamples`: Function to transform request/response examples before rendering. See
|
|
238
|
-
[Transforming Examples](../guides/transforming-examples.md) for detailed usage
|
|
239
|
-
- `generateCodeSnippet`: Function to generate custom code snippets for the API playground. See
|
|
240
|
-
[Advanced Configuration](#advanced-configuration) below
|
|
241
|
-
|
|
242
|
-
## Default Options
|
|
243
|
-
|
|
244
|
-
Instead of setting options for each API individually, you can use `defaults.apis` to set global
|
|
245
|
-
defaults that apply to all APIs:
|
|
246
|
-
|
|
247
|
-
```ts title=config
|
|
248
|
-
const config = {
|
|
249
|
-
defaults: {
|
|
250
|
-
apis: {
|
|
251
|
-
examplesLanguage: "shell", // Default language for code examples
|
|
252
|
-
disablePlayground: false, // Disable the interactive API playground
|
|
253
|
-
disableSidecar: false, // Disable the sidecar completely
|
|
254
|
-
showVersionSelect: "if-available", // Control version selector visibility
|
|
255
|
-
expandAllTags: false, // Control initial expanded state of tag categories
|
|
256
|
-
showInfoPage: true, // Show API information page as the index route
|
|
257
|
-
schemaDownload: {
|
|
258
|
-
enabled: true, // Enable schema download button
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
apis: {
|
|
263
|
-
type: "file",
|
|
264
|
-
input: "./openapi.json",
|
|
265
|
-
path: "/api",
|
|
266
|
-
},
|
|
267
|
-
};
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
Individual API options will override these defaults when specified.
|
|
271
|
-
|
|
272
|
-
## AI Assistants
|
|
273
|
-
|
|
274
|
-
The schema download dropdown includes AI assistant options (Claude, ChatGPT) by default. You can
|
|
275
|
-
customize or disable these using the top-level `aiAssistants` configuration. See
|
|
276
|
-
[AI Assistants](./ai-assistants.md) for full documentation.
|
|
277
|
-
|
|
278
|
-
## Advanced Configuration
|
|
279
|
-
|
|
280
|
-
### Custom Code Snippets
|
|
281
|
-
|
|
282
|
-
Use `generateCodeSnippet` to generate custom code snippets instead of the default HTTP examples.
|
|
283
|
-
This is useful when you want to show SDK usage or language-specific implementations.
|
|
284
|
-
|
|
285
|
-
```tsx title=config
|
|
286
|
-
const config: ApitogoConfig = {
|
|
287
|
-
apis: {
|
|
288
|
-
type: "file",
|
|
289
|
-
input: "./openapi.json",
|
|
290
|
-
path: "/api",
|
|
291
|
-
options: {
|
|
292
|
-
supportedLanguages: [
|
|
293
|
-
{ value: "js", label: "JavaScript" },
|
|
294
|
-
{ value: "python", label: "Python" },
|
|
295
|
-
],
|
|
296
|
-
generateCodeSnippet: ({ selectedLang, selectedServer, operation, example }) => {
|
|
297
|
-
if (operation.operationId === "createUser") {
|
|
298
|
-
if (selectedLang === "js") {
|
|
299
|
-
return `
|
|
300
|
-
import { Client } from "@mycompany/sdk";
|
|
301
|
-
|
|
302
|
-
const client = new Client({ baseUrl: "${selectedServer}" });
|
|
303
|
-
const user = await client.createUser(${JSON.stringify(example, null, 2)});
|
|
304
|
-
`.trim();
|
|
305
|
-
}
|
|
306
|
-
if (selectedLang === "python") {
|
|
307
|
-
return `
|
|
308
|
-
from mycompany import Client
|
|
309
|
-
|
|
310
|
-
client = Client(base_url="${selectedServer}")
|
|
311
|
-
user = client.create_user(${JSON.stringify(example)})
|
|
312
|
-
`.trim();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
// Return false to use default snippet generation
|
|
316
|
-
return false;
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
};
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
The function receives:
|
|
324
|
-
|
|
325
|
-
- `selectedLang`: Currently selected language from `supportedLanguages`
|
|
326
|
-
- `selectedServer`: Currently selected server URL
|
|
327
|
-
- `operation`: The OpenAPI operation object
|
|
328
|
-
- `example`: The current request body example
|
|
329
|
-
|
|
330
|
-
Return a string with the custom snippet, or `false` to fall back to default generation.
|
|
331
|
-
|
|
332
|
-
## Extensions
|
|
333
|
-
|
|
334
|
-
APIToGo supports OpenAPI extensions (properties starting with `x-`) to customize behavior at
|
|
335
|
-
different levels of your API documentation.
|
|
336
|
-
|
|
337
|
-
### Operations
|
|
338
|
-
|
|
339
|
-
- `x-apitogo-playground-enabled`: Control playground visibility for an operation (default: `true`)
|
|
340
|
-
- `x-explorer-enabled`: Alias for `x-apitogo-playground-enabled` for compatibility Example:
|
|
341
|
-
|
|
342
|
-
```json
|
|
343
|
-
{
|
|
344
|
-
"paths": {
|
|
345
|
-
"/users": {
|
|
346
|
-
"get": {
|
|
347
|
-
"summary": "Get users",
|
|
348
|
-
"x-apitogo-playground-enabled": false // Disable playground for this operation
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
### Tags
|
|
356
|
-
|
|
357
|
-
Extensions that can be applied to tag categories:
|
|
358
|
-
|
|
359
|
-
- `x-apitogo-collapsed`: Control initial collapsed state of a tag category (default: `true`)
|
|
360
|
-
- `x-apitogo-collapsible`: Control if a tag category can be collapsed (default: `true`)
|
|
361
|
-
|
|
362
|
-
Example:
|
|
363
|
-
|
|
364
|
-
```json
|
|
365
|
-
{
|
|
366
|
-
"tags": [
|
|
367
|
-
{
|
|
368
|
-
"name": "Users",
|
|
369
|
-
"x-apitogo-collapsed": false
|
|
370
|
-
}
|
|
371
|
-
]
|
|
372
|
-
}
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
### Tag Groups
|
|
376
|
-
|
|
377
|
-
Use `x-tagGroups` at the root of your OpenAPI document to group tags together in the navigation:
|
|
378
|
-
|
|
379
|
-
```yaml
|
|
380
|
-
x-tagGroups:
|
|
381
|
-
- name: Shipment
|
|
382
|
-
tags:
|
|
383
|
-
- Packages
|
|
384
|
-
- Parcels
|
|
385
|
-
- Letters
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
## Metadata
|
|
389
|
-
|
|
390
|
-
Your API reference page metadata is sourced directly from your OpenAPI spec. The
|
|
391
|
-
[`info`](https://spec.openapis.org/oas/v3.1.0#info-object) object is used set the corresponding tags
|
|
392
|
-
in the page's `head`.
|
|
393
|
-
|
|
394
|
-
| Metadata Property | OpenAPI Property | Comment |
|
|
395
|
-
| ----------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
396
|
-
| title | `info.title` | If `metadata.title` is set as a template string (ex. `%s - My Company`) it will be used |
|
|
397
|
-
| description | `info.summary` | `info.summary` is preferred as it is shorter and plaintext-only, but APIToGo will fall back to the `info.description` if no summary is provided |
|
|
1
|
+
---
|
|
2
|
+
title: API reference
|
|
3
|
+
sidebar_icon: book-open-check
|
|
4
|
+
description: >-
|
|
5
|
+
The portal's API page: made from the gateway's OpenAPI file, pointed at the gateway, with Try it,
|
|
6
|
+
and the OpenAPI extensions that shape it.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
The portal's **API Reference** page, at `/api`, is made from your gateway's OpenAPI file. There is
|
|
10
|
+
nothing to set up: when the project has a `gateway` with `specs`, the page is there.
|
|
11
|
+
|
|
12
|
+
```json title=apitogo.config.json
|
|
13
|
+
{
|
|
14
|
+
"gateway": {
|
|
15
|
+
"origin": { "mode": "managed", "source": "server", "runtime": "nodejs" },
|
|
16
|
+
"specs": ["apitogo/apis/openapi.yaml"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The page uses the first file in `specs`. JSON and YAML both work.
|
|
22
|
+
|
|
23
|
+
## What the page shows
|
|
24
|
+
|
|
25
|
+
The page shows your API as people call it, through the gateway, not as it runs behind it:
|
|
26
|
+
|
|
27
|
+
- **Servers** point at the gateway's address. Your origin's address never shows.
|
|
28
|
+
- **Security** says what the gateway checks: the API key header (`X-API-Key` unless
|
|
29
|
+
`gateway.policies.access.apiKeyHeader` names another), and a bearer token when `gateway.auth` is
|
|
30
|
+
set.
|
|
31
|
+
- Operations in `gateway.policies.operations.public` show no security, since they need no key.
|
|
32
|
+
- Operations in `gateway.policies.operations.deny` are left out.
|
|
33
|
+
|
|
34
|
+
Before the first deploy the gateway has no address yet, so `npx apitogo run` leaves the page out and
|
|
35
|
+
says so. It appears once the gateway is deployed.
|
|
36
|
+
|
|
37
|
+
## Try it
|
|
38
|
+
|
|
39
|
+
Each operation has a **Try it** panel that sends a real request to the gateway. Under
|
|
40
|
+
**Authentication** it offers:
|
|
41
|
+
|
|
42
|
+
- **Your API key**: a key the visitor created on the API keys page, in this browser.
|
|
43
|
+
- **Signed-in user**: the visitor's own sign-in token. It is offered only when the gateway checks
|
|
44
|
+
tokens (`gateway.auth`), since a gateway that checks keys would answer it with 401.
|
|
45
|
+
|
|
46
|
+
Turn the panel off for one operation with `x-apitogo-playground-enabled: false` (below).
|
|
47
|
+
|
|
48
|
+
## Who may read the OpenAPI file
|
|
49
|
+
|
|
50
|
+
The platform also publishes the file for other docs tools. By default anyone may read it. To limit
|
|
51
|
+
it to signed-in people:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
"gateway": { "export": { "access": "authenticated" } }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## OpenAPI extensions
|
|
58
|
+
|
|
59
|
+
Fields starting with `x-` in your OpenAPI file change how the page looks.
|
|
60
|
+
|
|
61
|
+
### Operations
|
|
62
|
+
|
|
63
|
+
- `x-apitogo-playground-enabled`: show Try it for this operation (default `true`).
|
|
64
|
+
`x-explorer-enabled` is the same.
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
paths:
|
|
68
|
+
/users:
|
|
69
|
+
get:
|
|
70
|
+
summary: Get users
|
|
71
|
+
x-apitogo-playground-enabled: false
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Tags
|
|
75
|
+
|
|
76
|
+
- `x-apitogo-collapsed`: the tag's section starts collapsed (default `true`).
|
|
77
|
+
- `x-apitogo-collapsible`: the tag's section can be collapsed (default `true`).
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
tags:
|
|
81
|
+
- name: Users
|
|
82
|
+
x-apitogo-collapsed: false
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Tag groups
|
|
86
|
+
|
|
87
|
+
Group tags in the sidebar with `x-tagGroups` at the root of the file:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
x-tagGroups:
|
|
91
|
+
- name: Shipment
|
|
92
|
+
tags: [Packages, Parcels, Letters]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Page title and description
|
|
96
|
+
|
|
97
|
+
The page's title and description come from the file's `info`: `info.title`, and `info.summary` (or
|
|
98
|
+
`info.description` when there is no summary).
|