jsonschema

package
v0.66.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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