fix: fix API docs manifest generation (#20897)

This commit is contained in:
Atif Ali
2025-11-24 18:57:01 +05:00
committed by GitHub
parent 6d41bfad81
commit 6882c43b39
2 changed files with 40 additions and 10 deletions
+24
View File
@@ -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"
+16 -10
View File
@@ -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
}