jsonschema

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndentLevel                  = 2
	DocumentationCommentStart    = "<!-- START CONFIG YAML: AUTOMATICALLY GENERATED with `go generate ./..., DO NOT UPDATE MANUALLY -->\n"
	DocumentationCommentEnd      = "<!-- END CONFIG YAML -->"
	DocumentationCommentStartLen = len(DocumentationCommentStart)
)

Variables

This section is empty.

Functions

func GenerateConfigDocs added in v0.43.0

func GenerateConfigDocs(schema *jsonschema.Schema, repeatedStructs []*jsonschema.Schema)

GenerateConfigDocs writes the default config into Config.md. For the properties in repeatedStructs, it writes only their description, instead of repeating the fields of their struct.

func GenerateSchema

func GenerateSchema() (*jsonschema.Schema, []*jsonschema.Schema)

GenerateSchema writes the schema of the user config, and returns it together with the properties that repeat the fields of a struct that the schema has at an earlier path.

func GetSchemaDir

func GetSchemaDir() string

Types

type Node added in v0.43.0

type Node struct {
	Name        string
	Description string
	Default     any
	Children    []*Node
}

func (*Node) MarshalYAML added in v0.43.0

func (n *Node) MarshalYAML() (any, error)

Jump to

Keyboard shortcuts

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