Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v2.16.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Schema is the compose-spec JSON schema

Functions

func AttributePaths added in v2.16.0

func AttributePaths() []tree.Path

AttributePaths returns the attribute paths (tree.Path patterns) the Compose Specification JSON schema declares, one per mapping attribute: pattern-keyed mappings (services, networks, per-key mounts…) contribute a tree.PathMatchAll component and sequence items a tree.PathMatchList component, matching the convention used across compose-go.

It gives a runtime the complete spec-level inventory to build its "supported attributes" declaration from (see loader.Options SupportedAttributes): start from the full specification and remove the paths the runtime does not implement, so every newly-specified attribute is reported as unsupported until it is deliberately wired in.

The result is sorted and stable for a given schema; the slice is shared, callers must not mutate it (clone before editing).

func Validate

func Validate(config map[string]interface{}) error

Validate uses the jsonschema to validate the configuration

Types

This section is empty.

Jump to

Keyboard shortcuts

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