Starlight plugin to generate documentation from OpenAPI/Swagger specifications
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 7 months ago
Published by github-actions[bot] 8 months ago
Bumps minimum required Astro version to 4.2.7 and Starlight to 0.19.0 - by @HiDeoo (c7fb9)
Starlight OpenAPI is now a Starlight plugin - by @HiDeoo (322c3)
You will need to update your Astro configuration to remove the previous version and add the new version as a Starlight plugin in your astro.config.mjs
file:
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";
-import { generateAPI } from 'starlight-openapi'
+import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
-// Generate the documentation and get the associated sidebar groups.
-const { openAPISidebarGroups, starlightOpenAPI } = await generateAPI([
- {
- base: 'api',
- label: 'My API',
- schema: '../schemas/api-schema.yaml',
- },
-])
export default defineConfig({
// …
integrations: [
starlight({
+ plugins: [
+ // Generate the OpenAPI documentation pages.
+ starlightOpenAPI([
+ {
+ base: 'api',
+ label: 'My API',
+ schema: '../schemas/api-schema.yaml',
+ },
+ ]),
+ ],
sidebar: [
{
label: 'Guides',
items: [{ label: 'Example Guide', link: '/guides/example/' }],
},
// Add the generated sidebar groups to the sidebar.
...openAPISidebarGroups,
],
title: "My Docs",
}),
- // Add the Starlight OpenAPI integration.
- starlightOpenAPI(),
],
});
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] about 1 year ago
oneOf
and anyOf
UI rendering issues with object schemas - by @HiDeoo (3f38a)
oneOf
and anyOf
UI rendering issues with array schemas - by @HiDeoo (2a12a)
enum
UI rendering issues with array schemas - by @HiDeoo (3af98)
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago