@lukoweb/apitogo 0.1.67 → 0.1.68

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.
Files changed (55) hide show
  1. package/dist/cli/cli.js +529 -379
  2. package/docs/components/playground.mdx +6 -8
  3. package/docs/components/slot.mdx +2 -2
  4. package/docs/concepts/auth-provider-api-identities.md +8 -12
  5. package/docs/configuration/ai-assistants.md +3 -3
  6. package/docs/configuration/api-catalog.md +4 -4
  7. package/docs/configuration/api-reference.md +11 -11
  8. package/docs/configuration/authentication-auth0.md +8 -1
  9. package/docs/configuration/authentication-azure-ad.md +8 -1
  10. package/docs/configuration/authentication-clerk.md +8 -1
  11. package/docs/configuration/authentication-firebase.md +8 -1
  12. package/docs/configuration/authentication-pingfederate.md +8 -1
  13. package/docs/configuration/authentication-supabase.md +10 -3
  14. package/docs/configuration/authentication.md +96 -195
  15. package/docs/configuration/build-configuration.mdx +2 -2
  16. package/docs/configuration/docs.md +10 -10
  17. package/docs/configuration/footer.mdx +84 -180
  18. package/docs/configuration/llms.md +1 -1
  19. package/docs/configuration/make-config.mdx +12 -5
  20. package/docs/configuration/manifest.md +4 -14
  21. package/docs/configuration/navigation.mdx +2 -2
  22. package/docs/configuration/overview.md +95 -310
  23. package/docs/configuration/protected-routes.md +3 -3
  24. package/docs/configuration/search.md +4 -3
  25. package/docs/configuration/site.md +5 -5
  26. package/docs/configuration/slots.mdx +1 -1
  27. package/docs/custom-plugins.md +1 -1
  28. package/docs/customization/colors-theme.mdx +8 -8
  29. package/docs/customization/fonts.md +4 -4
  30. package/docs/deploy/apitogo.md +18 -12
  31. package/docs/deploy/cloudflare-pages.md +0 -1
  32. package/docs/deploy/direct-upload.md +0 -1
  33. package/docs/deploy/github-pages.md +1 -2
  34. package/docs/deploy/vercel.md +2 -3
  35. package/docs/deployment.md +11 -10
  36. package/docs/extending/events.md +1 -1
  37. package/docs/guides/custom-pages.md +4 -8
  38. package/docs/guides/environment-variables.md +41 -49
  39. package/docs/guides/managing-api-keys-and-identities.md +40 -115
  40. package/docs/guides/navigation-rules.mdx +1 -1
  41. package/docs/guides/processors.mdx +2 -2
  42. package/docs/guides/transforming-examples.md +1 -1
  43. package/docs/markdown/code-blocks.md +2 -2
  44. package/docs/markdown/mdx.md +1 -1
  45. package/docs/mcp/go-live.md +100 -0
  46. package/docs/mcp/overview.md +76 -0
  47. package/docs/mcp/setup.md +173 -0
  48. package/docs/mcp/shape.md +76 -0
  49. package/docs/mcp/tools.md +102 -0
  50. package/docs/plugins.md +20 -1
  51. package/docs/quickstart.md +49 -54
  52. package/docs/writing.mdx +1 -1
  53. package/package.json +1 -1
  54. package/src/vite/plugin-config.ts +3 -0
  55. package/docs/guides/navigation-migration.md +0 -87
@@ -34,15 +34,14 @@ type PlaygroundProps = {
34
34
 
35
35
  ## Examples
36
36
 
37
- ### Zuplo Echo
37
+ ### httpbin example
38
38
 
39
- In this example, we're using the Zuplo Echo API to test the `POST /hello-world/{name}` endpoint.
39
+ Example against [httpbin](https://httpbin.org/) `POST /post`:
40
40
 
41
41
  <OpenPlaygroundButton
42
- server="https://echo.zuplo.io/"
43
- url="/hello-world/{name}"
42
+ server="https://httpbin.org/"
43
+ url="/post"
44
44
  headers={[{ name: "X-APIToGo-Playground", defaultValue: "Hello World" }]}
45
- pathParams={[{ name: "name", defaultValue: "John" }]}
46
45
  queryParams={[
47
46
  { name: "age", defaultValue: "30" },
48
47
  { name: "city", defaultValue: "New York" },
@@ -53,15 +52,14 @@ In this example, we're using the Zuplo Echo API to test the `POST /hello-world/{
53
52
 
54
53
  ```tsx
55
54
  <OpenPlaygroundButton
56
- server="https://echo.zuplo.io/"
57
- url="/hello-world/{name}"
55
+ server="https://httpbin.org/"
56
+ url="/post"
58
57
  headers={[
59
58
  {
60
59
  name: "X-APIToGo-Playground",
61
60
  defaultValue: "Hello World",
62
61
  },
63
62
  ]}
64
- pathParams={[{ name: "name", defaultValue: "John" }]}
65
63
  queryParams={[
66
64
  { name: "age", defaultValue: "30" },
67
65
  { name: "city", defaultValue: "New York" },
@@ -97,11 +97,11 @@ declare module "@lukoweb/apitogo" {
97
97
  ## Integration with Configuration
98
98
 
99
99
  The Slot component works with configuration-based slots. Content defined in your
100
- `apitogo.config.tsx` and content injected via `Slot.Source` components will be combined according to
100
+ `apitogo.config.json` and content injected via `Slot.Source` components will be combined according to
101
101
  the `type` parameter.
102
102
 
103
103
  ```tsx
104
- // In apitogo.config.tsx
104
+ // In your site config
105
105
  slots: {
106
106
  "page-header": <div>Config header</div>
107
107
  }
@@ -1,14 +1,11 @@
1
1
  ---
2
2
  title: Authentication Providers & API Identities
3
3
  sidebar_label: Authentication and Identities
4
- zuplo: false
5
4
  ---
6
5
 
7
- When building an API documentation portal, you often need to provide a way for users to authenticate
8
- their API requests. This typically involves managing API keys and different authentication
9
- identities. However, implementing a secure and user-friendly system for API key management can be
10
- complex and time-consuming. APIToGo provides a powerful solution to this problem through its API
11
- Keys and Identities system.
6
+ When building an API documentation portal, you often need a way for users to authenticate API
7
+ requests — API keys and other identities — separately from how they sign in to the portal.
8
+ APIToGo splits **portal authentication** from **API identities**.
12
9
 
13
10
  ## Authentication Providers and API Identities
14
11
 
@@ -23,7 +20,8 @@ Before diving into API Identities, it's important to understand that APIToGo sep
23
20
  authentication from API authentication. Authentication providers handle how users sign in to your
24
21
  documentation portal, while API Identities manage how these users interact with your APIs.
25
22
 
26
- Authentication providers (like Auth0 or custom JWT) handle:
23
+ Portal products use [`dev-portal`](../configuration/authentication.md) auth (backend-delegated
24
+ OIDC). SPA providers (Auth0, Clerk, …) are advanced for standalone docs sites. Providers handle:
27
25
 
28
26
  - User authentication for the documentation portal
29
27
  - Session management
@@ -70,14 +68,12 @@ demo API.
70
68
 
71
69
  :::note
72
70
 
73
- This example shows how to implement API Identities in APIToGo. If you're using Zuplo and you are
74
- using the built-in API Key management system, you don't need to implement this yourself. Zuplo will
75
- handle API Identities for you.
71
+ For APItoGo-hosted portals, subscription keys come from the platform after `dev-portal` sign-in.
72
+ Implement custom API Identities when the playground should attach your own keys or JWTs.
76
73
 
77
74
  :::
78
75
 
79
- To add API Identities to your APIToGo configuration, you need to implement the `ApiIdentityPlugin`
80
- interface. Here's an example:
76
+ To add API Identities, implement the `ApiIdentityPlugin` interface:
81
77
 
82
78
  ```typescript
83
79
  import { createApiIdentityPlugin } from "@lukoweb/apitogo/plugins";
@@ -14,7 +14,7 @@ behavior using the top-level `aiAssistants` configuration.
14
14
 
15
15
  To remove all AI assistant options:
16
16
 
17
- ```ts title=apitogo.config.ts
17
+ ```ts title=config
18
18
  const config = {
19
19
  aiAssistants: false,
20
20
  // ...
@@ -23,7 +23,7 @@ const config = {
23
23
 
24
24
  ## Use Only Specific Presets
25
25
 
26
- ```ts title=apitogo.config.ts
26
+ ```ts title=config
27
27
  const config = {
28
28
  aiAssistants: ["claude"], // Only show Claude
29
29
  // ...
@@ -37,7 +37,7 @@ Available presets: `"claude"`, `"chatgpt"`
37
37
  You can add custom entries with a label and URL. Use `{pageUrl}` as a placeholder in the URL string,
38
38
  or provide a callback for full control:
39
39
 
40
- ```ts title=apitogo.config.ts
40
+ ```ts title=config
41
41
  const config = {
42
42
  aiAssistants: [
43
43
  "claude", // built-in preset
@@ -11,7 +11,7 @@ creates an overview of all your APIs and lets you organize them into categories
11
11
  The first step to enable the API Catalog, you need to add a `catalogs` object to your APIToGo
12
12
  configuration file.
13
13
 
14
- ```js title=apitogo.config.ts
14
+ ```js title=config
15
15
  const config = {
16
16
  // ...
17
17
  catalogs: {
@@ -25,7 +25,7 @@ const config = {
25
25
  You can then add your APIs to the catalog by adding the `categories` property to your API
26
26
  configuration.
27
27
 
28
- ```js title=apitogo.config.ts
28
+ ```js title=config
29
29
  const config = {
30
30
  // ...
31
31
  apis: [
@@ -61,7 +61,7 @@ const config = {
61
61
  You can select which APIs are shown in the catalog by using the `items` property. The `items`
62
62
  property is an array of navigation IDs of the APIs you want to show in the catalog.
63
63
 
64
- ```js title=apitogo.config.ts
64
+ ```js title=config
65
65
  const config = {
66
66
  // ...
67
67
  catalogs: {
@@ -94,7 +94,7 @@ const config = {
94
94
  You can filter which APIs are shown in the catalog by using the `filterItems` property. The function
95
95
  receives the items and context as arguments.
96
96
 
97
- ```js title=apitogo.config.ts
97
+ ```js title=config
98
98
  const config = {
99
99
  // ...
100
100
  catalogs: {
@@ -18,7 +18,7 @@ local file path. The OpenAPI document can be in either JSON or YAML format.
18
18
  You can reference a local OpenAPI document by setting the `type` to `file` and providing the path to
19
19
  the file.
20
20
 
21
- ```ts title=apitogo.config.ts
21
+ ```ts title=config
22
22
  const config = {
23
23
  // ...
24
24
  apis: {
@@ -45,12 +45,12 @@ If your OpenAPI document is accessible elsewhere via URL you can use this config
45
45
  the `input` value to the URL of your own OpenAPI document (you can use the Rick & Morty API document
46
46
  if you want to test and play around):
47
47
 
48
- ```ts title=apitogo.config.ts
48
+ ```ts title=config
49
49
  const config = {
50
50
  // ...
51
51
  apis: {
52
52
  type: "url",
53
- input: "https://rickandmorty.zuplo.io/openapi.json",
53
+ input: "https://petstore3.swagger.io/api/v3/openapi.json",
54
54
  path: "/api",
55
55
  },
56
56
  // ...
@@ -71,7 +71,7 @@ hosting the document has the correct CORS policy in place to allow the APIToGo s
71
71
  When using `type: "file"`, you can provide an array of file paths to create versioned API
72
72
  documentation. Version metadata is automatically extracted from each OpenAPI schema at build time:
73
73
 
74
- ```ts title=apitogo.config.ts
74
+ ```ts title=config
75
75
  const config = {
76
76
  apis: {
77
77
  type: "file",
@@ -87,7 +87,7 @@ const config = {
87
87
 
88
88
  If you need to override version metadata, you can specify it explicitly:
89
89
 
90
- ```ts title=apitogo.config.ts
90
+ ```ts title=config
91
91
  const config = {
92
92
  apis: {
93
93
  type: "file",
@@ -118,7 +118,7 @@ You can specify:
118
118
  You can also mix strings and objects in the array - use strings for defaults and objects when you
119
119
  need to customize:
120
120
 
121
- ```ts title=apitogo.config.ts
121
+ ```ts title=config
122
122
  const config = {
123
123
  apis: {
124
124
  type: "file",
@@ -140,7 +140,7 @@ const config = {
140
140
  If you have one schema containing multiple API versions (e.g. `/v1/...` and `/v2/...` paths), you
141
141
  can split it into separate versions by appending query parameters to the input path:
142
142
 
143
- ```ts title=apitogo.config.ts
143
+ ```ts title=config
144
144
  const config = {
145
145
  apis: {
146
146
  type: "file",
@@ -161,7 +161,7 @@ When using `type: "url"`, you can provide an array of version configurations. Si
161
161
  schemas cannot be processed at build time, you must explicitly specify the version identifier and
162
162
  optional label:
163
163
 
164
- ```ts title=apitogo.config.ts
164
+ ```ts title=config
165
165
  const config = {
166
166
  apis: {
167
167
  type: "url",
@@ -192,7 +192,7 @@ Each URL version object requires:
192
192
 
193
193
  The `options` field allows you to customize the API reference behavior:
194
194
 
195
- ```ts title=apitogo.config.ts
195
+ ```ts title=config
196
196
  const config = {
197
197
  apis: {
198
198
  type: "file",
@@ -244,7 +244,7 @@ Available options:
244
244
  Instead of setting options for each API individually, you can use `defaults.apis` to set global
245
245
  defaults that apply to all APIs:
246
246
 
247
- ```ts title=apitogo.config.ts
247
+ ```ts title=config
248
248
  const config = {
249
249
  defaults: {
250
250
  apis: {
@@ -282,7 +282,7 @@ customize or disable these using the top-level `aiAssistants` configuration. See
282
282
  Use `generateCodeSnippet` to generate custom code snippets instead of the default HTTP examples.
283
283
  This is useful when you want to show SDK usage or language-specific implementations.
284
284
 
285
- ```tsx title=apitogo.config.tsx
285
+ ```tsx title=config
286
286
  const config: ApitogoConfig = {
287
287
  apis: {
288
288
  type: "file",
@@ -6,6 +6,13 @@ description:
6
6
  integration steps for secure API documentation access.
7
7
  ---
8
8
 
9
+ :::caution{title="SPA / advanced"}
10
+
11
+ Portal products on APItoGo use [`dev-portal`](./authentication.md) authentication. Use Auth0 SPA
12
+ integration only for standalone docs sites that talk to Auth0 directly.
13
+
14
+ :::
15
+
9
16
  Auth0 is a flexible authentication and authorization platform that integrates seamlessly with
10
17
  APIToGo. This guide walks you through setting up Auth0 authentication for your documentation site.
11
18
 
@@ -66,7 +73,7 @@ If you don't have an Auth0 account, you can sign up for a
66
73
  Add the Auth0 configuration to your [APIToGo configuration file](./overview.md):
67
74
 
68
75
  ```typescript
69
- // apitogo.config.ts
76
+ // site config
70
77
  export default {
71
78
  // ... other configuration
72
79
  authentication: {
@@ -6,6 +6,13 @@ description:
6
6
  enabling secure single sign-on for your organization.
7
7
  ---
8
8
 
9
+ :::caution{title="SPA / advanced"}
10
+
11
+ Portal products on APItoGo use [`dev-portal`](./authentication.md) authentication. Use Azure AD SPA
12
+ integration only for standalone docs sites that talk to Entra ID directly.
13
+
14
+ :::
15
+
9
16
  Azure Active Directory (now Microsoft Entra ID) provides enterprise-grade authentication and
10
17
  authorization for organizations using Microsoft's cloud identity platform. This guide shows you how
11
18
  to integrate Azure AD with your APIToGo documentation site.
@@ -69,7 +76,7 @@ to integrate Azure AD with your APIToGo documentation site.
69
76
  Add the configuration to your [APIToGo configuration file](./overview.md):
70
77
 
71
78
  ```typescript
72
- // apitogo.config.ts
79
+ // site config
73
80
  export default {
74
81
  // ... other configuration
75
82
  authentication: {
@@ -6,6 +6,13 @@ description:
6
6
  experience with modern UI components and extensive customization options.
7
7
  ---
8
8
 
9
+ :::caution{title="SPA / advanced"}
10
+
11
+ Portal products on APItoGo use [`dev-portal`](./authentication.md) authentication. Use Clerk SPA
12
+ integration only for standalone docs sites that talk to Clerk directly.
13
+
14
+ :::
15
+
9
16
  Clerk is a modern authentication platform that provides beautiful, customizable UI components and a
10
17
  developer-friendly experience. This guide walks you through integrating Clerk authentication with
11
18
  your APIToGo documentation site.
@@ -54,7 +61,7 @@ that provides 10,000 monthly active users.
54
61
  Add the Clerk configuration to your [APIToGo configuration file](./overview.md):
55
62
 
56
63
  ```typescript
57
- // apitogo.config.ts
64
+ // site config
58
65
  export default {
59
66
  // ... other configuration
60
67
  authentication: {
@@ -6,6 +6,13 @@ description:
6
6
  infrastructure with multiple sign-in providers.
7
7
  ---
8
8
 
9
+ :::caution{title="SPA / advanced"}
10
+
11
+ Portal products on APItoGo use [`dev-portal`](./authentication.md) authentication. Use Firebase SPA
12
+ integration only for standalone docs sites that talk to Firebase directly.
13
+
14
+ :::
15
+
9
16
  Firebase Authentication provides a comprehensive identity solution from Google, supporting
10
17
  email/password authentication and federated identity providers like Google, Facebook, Twitter, and
11
18
  more. This guide shows you how to integrate Firebase Authentication with your APIToGo documentation
@@ -34,7 +41,7 @@ site.
34
41
 
35
42
  Add the Firebase configuration to your [APIToGo configuration file](./overview.md):
36
43
 
37
- ```typescript title="apitogo.config.ts"
44
+ ```typescript title="config"
38
45
  export default {
39
46
  authentication: {
40
47
  type: "firebase",
@@ -6,6 +6,13 @@ description:
6
6
  enterprise-grade single sign-on.
7
7
  ---
8
8
 
9
+ :::caution{title="SPA / advanced"}
10
+
11
+ Portal products on APItoGo use [`dev-portal`](./authentication.md) authentication. Use PingFederate
12
+ SPA integration only for standalone docs sites that talk to PingFederate directly.
13
+
14
+ :::
15
+
9
16
  PingFederate is an enterprise federation server that enables secure single sign-on (SSO) and API
10
17
  security for organizations. This guide walks you through integrating PingFederate with APIToGo using
11
18
  OpenID Connect.
@@ -50,7 +57,7 @@ OpenID Connect.
50
57
  Add the PingFederate configuration to your [APIToGo configuration file](./overview.md):
51
58
 
52
59
  ```typescript
53
- // apitogo.config.ts
60
+ // site config
54
61
  export default {
55
62
  // ... other configuration
56
63
  authentication: {
@@ -6,6 +6,13 @@ description:
6
6
  providers for secure documentation access.
7
7
  ---
8
8
 
9
+ :::caution{title="SPA / advanced"}
10
+
11
+ Portal products on APItoGo use [`dev-portal`](./authentication.md) authentication. Use Supabase SPA
12
+ integration only for standalone docs sites that talk to Supabase directly.
13
+
14
+ :::
15
+
9
16
  Supabase is an open-source Firebase alternative that provides authentication, database, and storage
10
17
  services. This guide shows you how to integrate Supabase authentication with your APIToGo
11
18
  documentation site.
@@ -40,7 +47,7 @@ You'll need a Supabase project. If you don't have one,
40
47
 
41
48
  Add the Supabase configuration to your [APIToGo configuration file](./overview.md):
42
49
 
43
- ```ts title="apitogo.config.ts"
50
+ ```ts title="config"
44
51
  export default {
45
52
  // ... other configuration
46
53
  authentication: {
@@ -55,7 +62,7 @@ You'll need a Supabase project. If you don't have one,
55
62
 
56
63
  You can configure multiple providers:
57
64
 
58
- ```ts title="apitogo.config.ts"
65
+ ```ts title="config"
59
66
  export default {
60
67
  // ... other configuration
61
68
  authentication: {
@@ -116,7 +123,7 @@ default in Supabase. To disable email/password authentication and only use OAuth
116
123
 
117
124
  All available configuration options for Supabase authentication:
118
125
 
119
- ```ts title="apitogo.config.ts"
126
+ ```ts title="config"
120
127
  authentication: {
121
128
  type: "supabase",
122
129