feat(website): add api openapi spec
This commit is contained in:
parent
766fa918e5
commit
04e2164419
@ -1,5 +1,6 @@
|
|||||||
import starlight from '@astrojs/starlight'
|
import starlight from '@astrojs/starlight'
|
||||||
import { defineConfig } from 'astro/config'
|
import { defineConfig } from 'astro/config'
|
||||||
|
import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
outDir: '../../build/website',
|
outDir: '../../build/website',
|
||||||
@ -25,11 +26,22 @@ export default defineConfig({
|
|||||||
label: 'Guides',
|
label: 'Guides',
|
||||||
items: [{ label: 'Getting started', slug: 'guides/getting-started' }],
|
items: [{ label: 'Getting started', slug: 'guides/getting-started' }],
|
||||||
},
|
},
|
||||||
|
...openAPISidebarGroups,
|
||||||
// {
|
// {
|
||||||
// label: 'Reference',
|
// label: 'Reference',
|
||||||
// autogenerate: { directory: 'reference' },
|
// autogenerate: { directory: 'reference' },
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
|
plugins: [
|
||||||
|
// Generate the OpenAPI documentation pages.
|
||||||
|
starlightOpenAPI([
|
||||||
|
{
|
||||||
|
base: 'api',
|
||||||
|
label: 'API',
|
||||||
|
schema: 'https://api.boring.tools/openapi.json',
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@ -10,10 +10,11 @@
|
|||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@astrojs/check": "^0.9.3",
|
||||||
"@astrojs/starlight": "^0.28.2",
|
"@astrojs/starlight": "^0.28.2",
|
||||||
"astro": "^4.15.3",
|
"astro": "^4.15.3",
|
||||||
"sharp": "^0.32.5",
|
"sharp": "^0.32.5",
|
||||||
"@astrojs/check": "^0.9.3",
|
"starlight-openapi": "^0.7.0",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user