Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten version of documentation #2284

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bundle/docsgen/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func buildMarkdown(nodes []rootNode, outputFile, header string) error {
if node.TopLevel {
m = m.H2(node.Title)
} else {
m = m.H3(node.Title)
// m = m.H3(node.Title)
m = m.H2(node.Title)
}
m = m.LF()

Expand Down
6 changes: 4 additions & 2 deletions bundle/docsgen/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ func getAttributes(props, refs map[string]*jsonschema.Schema, ownFields map[stri
}
var reference string
if isReferenceType(v, refs, ownFields) && !circular {
reference = prefix + "." + k
// reference = prefix + "." + k
reference = k
}
attributes = append(attributes, attributeNode{
Title: k,
Expand Down Expand Up @@ -209,7 +210,8 @@ func extractNodes(prefix string, props, refs map[string]*jsonschema.Schema, ownF
}
v = resolveRefs(v, refs)
if v.Type == "object" || v.Type == "array" {
nodes = append(nodes, rootProp{prefix + "." + k, v, false, isCycleField(k)})
// nodes = append(nodes, rootProp{prefix + "." + k, v, false, isCycleField(k)})
nodes = append(nodes, rootProp{k, v, false, isCycleField(k)})
}
}
return nodes
Expand Down
Loading
Loading