mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
docs: api separation (#3630)
# What does this PR do? First step towards cleaning up the API reference section of the docs. - Separates API reference into 3 sections: stable (`v1`), experimental (`v1alpha` and `v1beta`), and deprecated (`deprecated=True`) - Each section is accessible via the dropdown menu and `docs/api-overview` <img width="1237" height="321" alt="Screenshot 2025-09-30 at 5 47 30 PM" src="https://github.com/user-attachments/assets/fe0e498c-b066-46ed-a48e-4739d3b6724c" /> <img width="860" height="510" alt="Screenshot 2025-09-30 at 5 47 49 PM" src="https://github.com/user-attachments/assets/a92a8d8c-94bf-42d5-9f5b-b47bb2b14f9c" /> - Deprecated APIs: Added styling to the sidebar, and a notice on the endpoint pages <img width="867" height="428" alt="Screenshot 2025-09-30 at 5 47 43 PM" src="https://github.com/user-attachments/assets/9e6e050d-c782-461b-8084-5ff6496d7bd9" /> Closes #3628 TODO in follow-up PRs: - Add the ability to annotate API groups with supplementary content (so we can have longer descriptions of complex APIs like Responses) - Clean up docstrings to show API endpoints (or short semantic titles) in the sidebar ## Test Plan - Local testing - Made sure API conformance test still passes
This commit is contained in:
parent
7f1a33f51c
commit
b6a5bccadf
15 changed files with 35504 additions and 25684 deletions
|
@ -55,10 +55,27 @@ const config: Config = {
|
|||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'apiSidebar',
|
||||
position: 'left',
|
||||
type: 'dropdown',
|
||||
label: 'API Reference',
|
||||
position: 'left',
|
||||
to: '/docs/api-overview',
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'stableApiSidebar',
|
||||
label: '🟢 Stable APIs',
|
||||
},
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'experimentalApiSidebar',
|
||||
label: '🟡 Experimental APIs',
|
||||
},
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'deprecatedApiSidebar',
|
||||
label: '🔴 Deprecated APIs',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/llamastack/llama-stack',
|
||||
|
@ -83,7 +100,7 @@ const config: Config = {
|
|||
},
|
||||
{
|
||||
label: 'API Reference',
|
||||
to: '/docs/api/llama-stack-specification',
|
||||
to: '/docs/api-overview',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -170,7 +187,7 @@ const config: Config = {
|
|||
id: "openapi",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
llamastack: {
|
||||
stable: {
|
||||
specPath: "static/llama-stack-spec.yaml",
|
||||
outputDir: "docs/api",
|
||||
downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/llama-stack-spec.yaml",
|
||||
|
@ -179,6 +196,24 @@ const config: Config = {
|
|||
categoryLinkSource: "tag",
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
experimental: {
|
||||
specPath: "static/experimental-llama-stack-spec.yaml",
|
||||
outputDir: "docs/api-experimental",
|
||||
downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/experimental-llama-stack-spec.yaml",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
deprecated: {
|
||||
specPath: "static/deprecated-llama-stack-spec.yaml",
|
||||
outputDir: "docs/api-deprecated",
|
||||
downloadUrl: "https://raw.githubusercontent.com/meta-llama/llama-stack/main/docs/static/deprecated-llama-stack-spec.yaml",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
} satisfies Plugin.PluginOptions,
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue