renderer

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HeaderOffset int

Functions

func RenderDocumentation

func RenderDocumentation(r Renderer, objects map[string]jsonschema.Schema, requiredObjectNames map[string]bool, requiredOnly bool, depth int, flatObjects []string) (string, error)

Types

type AsciiDocRenderer

type AsciiDocRenderer struct {
	// contains filtered or unexported fields
}

func (*AsciiDocRenderer) Header

func (a *AsciiDocRenderer) Header(title string, level int) string

func (*AsciiDocRenderer) PropertyHeader

func (a *AsciiDocRenderer) PropertyHeader(title string, level int) string

func (*AsciiDocRenderer) PropertyRow

func (a *AsciiDocRenderer) PropertyRow(parent, name string, schema jsonschema.Schema, maxDepth bool) string

func (AsciiDocRenderer) TableFooter

func (AsciiDocRenderer) TableFooter() string

func (AsciiDocRenderer) TableHeader

func (AsciiDocRenderer) TableHeader() string

func (*AsciiDocRenderer) TextParagraph

func (a *AsciiDocRenderer) TextParagraph(text string) string

type MarkdownRenderer

type MarkdownRenderer struct {
	// contains filtered or unexported fields
}

func (*MarkdownRenderer) Header

func (m *MarkdownRenderer) Header(title string, level int) string

func (*MarkdownRenderer) PropertyHeader

func (m *MarkdownRenderer) PropertyHeader(title string, level int) string

func (*MarkdownRenderer) PropertyRow

func (m *MarkdownRenderer) PropertyRow(parent, name string, schema jsonschema.Schema, maxDepth bool) string

func (MarkdownRenderer) TableFooter

func (MarkdownRenderer) TableFooter() string

func (MarkdownRenderer) TableHeader

func (MarkdownRenderer) TableHeader() string

func (MarkdownRenderer) TextParagraph

func (MarkdownRenderer) TextParagraph(text string) string

type Renderer

type Renderer interface {
	Header(string, int) string
	PropertyHeader(string, int) string
	TableHeader() string
	TableFooter() string
	PropertyRow(string, string, jsonschema.Schema, bool) string
	TextParagraph(string) string
}

func NewAsciidocRenderer

func NewAsciidocRenderer(flatOutput string) Renderer

func NewMarkdownRenderer

func NewMarkdownRenderer(flatOutput string) Renderer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL