apiuikit 1.5.2 → 1.6.0
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/README.md +11 -8
- package/dist/{CodeSamples-DmiNojAj.js → CodeSamples-C5u3VGKi.js} +895 -913
- package/dist/CodeSamples-CRObUKHj.cjs +50 -0
- package/dist/{LogoExtension-DZ8VtlAH.js → LogoExtension-BbOZyyI7.js} +1 -1
- package/dist/{LogoExtension-6P3B9CAh.cjs → LogoExtension-Bri3O9Zb.cjs} +1 -1
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +18 -18
- package/dist/{index-DggFmM--.js → index-C65x4n-2.js} +4522 -4537
- package/dist/{index-BDg1AYkE.js → index-Cm3BxV47.js} +630 -620
- package/dist/{index-Mbbr0TR2.js → index-DKGx9erP.js} +1 -1
- package/dist/{index-B_GqMwc6.cjs → index-DQqbljF-.cjs} +39 -39
- package/dist/index-Qg1sJSxE.cjs +139 -0
- package/dist/{index-BbfpKZY1.cjs → index-our7aldY.cjs} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{protoToJsonSchema-CuaV2JD7.js → protoToJsonSchema-CUW6qxgm.js} +1 -1
- package/dist/{protoToJsonSchema-BBQdrLOM.cjs → protoToJsonSchema-ihLMaBYf.cjs} +1 -1
- package/dist/{protobufSchemaParser-bHp3BKik.js → protobufSchemaParser-5O-3561f.js} +2 -2
- package/dist/{protobufSchemaParser-DBjKEuyJ.cjs → protobufSchemaParser-Br30FYfe.cjs} +1 -1
- package/dist/public/sections.d.ts +7 -7
- package/package.json +1 -1
- package/dist/CodeSamples-D5_WV4f3.cjs +0 -50
- package/dist/index-cEBLn6v9.cjs +0 -139
package/README.md
CHANGED
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/apiuikit)
|
|
5
5
|
[](https://www.npmjs.com/package/@apiuikit/web-component)
|
|
6
6
|
[](./LICENSE)
|
|
7
|
+
[](https://apiuikit.com)
|
|
7
8
|
|
|
8
9
|
React component library for rendering API specifications. Point it at an AsyncAPI or OpenAPI document and get a full interactive UI, which includes: servers, channels/endpoints, operations, messages, schemas, with no manual mapping required.
|
|
9
10
|
|
|
11
|
+
**[▶ Try it out in the Playground](https://playground.apiuikit.com)**
|
|
12
|
+
|
|
10
13
|
> **Spec compatibility:** apiuikit renders AsyncAPI 3.x and OpenAPI 3.0/3.1
|
|
11
14
|
> documents. Version compatibility does not imply that every specification
|
|
12
15
|
> keyword has a dedicated UI; see [OpenAPI coverage](./docs/usage/openapi.md#coverage)
|
|
@@ -71,25 +74,25 @@ export default function App() {
|
|
|
71
74
|
Prefer your own layout over the full widget? Render one section on its own by passing it a `document`:
|
|
72
75
|
|
|
73
76
|
```tsx
|
|
74
|
-
import {
|
|
77
|
+
import { AsyncAPIOperations } from "apiuikit";
|
|
75
78
|
import doc from "./asyncapi.json";
|
|
76
79
|
|
|
77
80
|
export default function OperationsPage() {
|
|
78
|
-
return <
|
|
81
|
+
return <AsyncAPIOperations document={doc} />;
|
|
79
82
|
}
|
|
80
83
|
```
|
|
81
84
|
|
|
82
|
-
`
|
|
85
|
+
`AsyncAPIServers`, `AsyncAPIOperations`, `AsyncAPIMessages`, `AsyncAPISchemas`, and `AsyncAPIInfo` all work this way (OpenAPI equivalents: `OpenAPIServers`, `OpenAPIEndpoints`, `OpenAPISchemas`, `OpenAPIInfo`). To arrange several of them together, wrap them in `AsyncAPIProvider` (or `OpenAPIProvider`) instead so the document is resolved once and shared:
|
|
83
86
|
|
|
84
87
|
```tsx
|
|
85
|
-
import { AsyncAPIProvider,
|
|
88
|
+
import { AsyncAPIProvider, AsyncAPIServers, AsyncAPIOperations, AsyncAPISchemas } from "apiuikit";
|
|
86
89
|
|
|
87
90
|
export default function CustomLayout() {
|
|
88
91
|
return (
|
|
89
92
|
<AsyncAPIProvider document={doc}>
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
+
<AsyncAPIServers />
|
|
94
|
+
<AsyncAPIOperations />
|
|
95
|
+
<AsyncAPISchemas />
|
|
93
96
|
</AsyncAPIProvider>
|
|
94
97
|
);
|
|
95
98
|
}
|
|
@@ -99,7 +102,7 @@ See the full usage docs for props, configuration options, and more:
|
|
|
99
102
|
|
|
100
103
|
- [Without Parser](./docs/usage/no-parser.md) (`AsyncAPI` component)
|
|
101
104
|
- [With Parser](./docs/usage/with-parser.md) (`AsyncAPIRenderer` component, `parseAndRender` utility)
|
|
102
|
-
- [Composable Sections](./docs/usage/sections.md) (`
|
|
105
|
+
- [Composable Sections](./docs/usage/sections.md) (`AsyncAPIServers`, `AsyncAPIOperations`, `AsyncAPIMessages`, `AsyncAPISchemas`, `AsyncAPIInfo`, `AsyncAPIProvider`)
|
|
103
106
|
- [Configuration](./docs/configuration/config.md) (`ConfigInterface`: theme, show flags, sidebar, sidePanel, etc.)
|
|
104
107
|
- [Web Components](./docs/usage/with-webcomponents.md) (`<apiuikit-asyncapi>`, `<apiuikit-asyncapi-renderer>`, use apiuikit from any framework)
|
|
105
108
|
- [Markdown export](./docs/usage/markdown-export.md) (making your docs AI-readable: `config.markdown.url`, `documentToMarkdown`, `documentToLlmsTxt`)
|