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
+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
}