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

schema

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: BSD-3-Clause, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package schema embeds the Compose Specification's JSON schema (compose-spec/compose-spec, schema/compose-spec.json, Apache-2.0; see LICENSE in this directory) and answers which attributes it defines where. The loader uses it to tell an attribute the specification defines but this implementation does not apply (a warning) from one it does not define at all (an error, as the schema's additionalProperties false makes it).

The full schema validation runs in the tests (compose_test.go), where a validator's weight costs nothing: the browser build stays light.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

func Lookup(path ...string) (props map[string]bool, closed bool)

Lookup walks path from the document root: each element is a property name, "*" for an entry of a mapping with user-defined keys (patternProperties), or "[]" for an item of an array. It reports the attributes defined there and whether the place is a closed object (only those attributes allowed).

func Raw

func Raw() []byte

Raw returns the embedded schema document.

Types

This section is empty.

Jump to

Keyboard shortcuts

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