mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: fix API docs manifest generation (#20897)
This commit is contained in:
@@ -1130,6 +1130,10 @@
|
||||
"title": "General",
|
||||
"path": "./reference/api/general.md"
|
||||
},
|
||||
{
|
||||
"title": "AI Bridge",
|
||||
"path": "./reference/api/aibridge.md"
|
||||
},
|
||||
{
|
||||
"title": "Agents",
|
||||
"path": "./reference/api/agents.md"
|
||||
@@ -1162,6 +1166,10 @@
|
||||
"title": "Enterprise",
|
||||
"path": "./reference/api/enterprise.md"
|
||||
},
|
||||
{
|
||||
"title": "Experimental",
|
||||
"path": "./reference/api/experimental.md"
|
||||
},
|
||||
{
|
||||
"title": "Files",
|
||||
"path": "./reference/api/files.md"
|
||||
@@ -1170,6 +1178,10 @@
|
||||
"title": "Git",
|
||||
"path": "./reference/api/git.md"
|
||||
},
|
||||
{
|
||||
"title": "InitScript",
|
||||
"path": "./reference/api/initscript.md"
|
||||
},
|
||||
{
|
||||
"title": "Insights",
|
||||
"path": "./reference/api/insights.md"
|
||||
@@ -1178,6 +1190,10 @@
|
||||
"title": "Members",
|
||||
"path": "./reference/api/members.md"
|
||||
},
|
||||
{
|
||||
"title": "Notifications",
|
||||
"path": "./reference/api/notifications.md"
|
||||
},
|
||||
{
|
||||
"title": "Organizations",
|
||||
"path": "./reference/api/organizations.md"
|
||||
@@ -1186,6 +1202,14 @@
|
||||
"title": "PortSharing",
|
||||
"path": "./reference/api/portsharing.md"
|
||||
},
|
||||
{
|
||||
"title": "Prebuilds",
|
||||
"path": "./reference/api/prebuilds.md"
|
||||
},
|
||||
{
|
||||
"title": "Provisioning",
|
||||
"path": "./reference/api/provisioning.md"
|
||||
},
|
||||
{
|
||||
"title": "Schemas",
|
||||
"path": "./reference/api/schemas.md"
|
||||
|
||||
@@ -198,20 +198,26 @@ func writeDocs(sections [][]byte) error {
|
||||
}
|
||||
|
||||
for i, r := range m.Routes {
|
||||
if r.Title != "API" {
|
||||
if r.Title != "Reference" {
|
||||
continue
|
||||
}
|
||||
|
||||
var children []route
|
||||
for _, mdf := range mdFiles {
|
||||
docRoute := route{
|
||||
Title: mdf.title,
|
||||
Path: mdf.path,
|
||||
for j, child := range r.Children {
|
||||
if child.Title != "REST API" {
|
||||
continue
|
||||
}
|
||||
children = append(children, docRoute)
|
||||
}
|
||||
|
||||
m.Routes[i].Children = children
|
||||
var children []route
|
||||
for _, mdf := range mdFiles {
|
||||
docRoute := route{
|
||||
Title: mdf.title,
|
||||
Path: mdf.path,
|
||||
}
|
||||
children = append(children, docRoute)
|
||||
}
|
||||
|
||||
m.Routes[i].Children[j].Children = children
|
||||
break
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user