fix: Styling

This commit is contained in:
Ilya Kuznetsov 2025-01-07 16:52:01 +01:00
parent c6703c1363
commit fe6ba76b7d
1 changed files with 2 additions and 6 deletions

View File

@ -109,13 +109,9 @@ func buildMarkdown(nodes []rootNode, outputFile, header string) error {
m = m.LF()
if len(node.ObjectKeyAttributes) > 0 {
itemName := removePluralForm(node.Title)
fieldName := fmt.Sprintf("%s-name", itemName)
m = buildAttributeTable(m, []attributeNode{
{Title: fieldName, Type: "Map", Description: fmt.Sprintf("The definition of a %s. See %s", itemName, md.Link("_", "#"+fieldName))},
})
n := removePluralForm(node.Title)
m = m.CodeBlocks("yaml", fmt.Sprintf("%ss:\n <%s-name>:\n <%s-field-name>: <%s-field-value>", n, n, n, n))
m = m.LF()
m = m.H3(fieldName)
m = buildAttributeTable(m, node.ObjectKeyAttributes)
} else if len(node.ArrayItemAttributes) > 0 {
m = m.LF()