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:
@@ -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