docgen

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package docgen generates the reference documentation from the code, so it cannot drift: the CLI reference from the cobra commands, and the x-mutti reference and JSON Schemas from the configuration structs and their comments.

Index

Constants

View Source
const (
	CLIDir         = "reference/cli"
	XMuttiSchema   = "reference/x-mutti.schema.json"
	ComposeSchema  = "reference/compose-with-mutti.schema.json"
	XMuttiMarkdown = "reference/x-mutti.md"
)

Paths of the generated files, relative to the docs directory.

View Source
const ComposeSpecSchema = "https://raw.githubusercontent.com/compose-spec/compose-spec/main/schema/compose-spec.json"

ComposeSpecSchema is the official Compose file schema the combined schema extends.

Variables

This section is empty.

Functions

func Generate

func Generate(repoRoot, docsDir string, root *cobra.Command) error

Generate writes the reference documentation into docsDir. repoRoot is where the module's sources are, for the comments that become descriptions.

func Markdown

func Markdown(s *jsonschema.Schema) []byte

Markdown renders the x-mutti reference: one row per key, nested keys with dotted paths.

func Schema

func Schema(repoRoot string) (*jsonschema.Schema, error)

Schema returns the JSON Schema of the x-mutti block, with descriptions from the Go comments of the configuration structs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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