package
0.7.0
Repository: https://github.com/google/gnostic.git
Documentation: pkg.go.dev

# README

jsonschema

This directory contains code for reading, writing, and manipulating JSON schemas.

# Functions

NewBaseSchema builds a schema object from an embedded json representation.
NewNamedSchema creates and returns a new object.
NewSchemaFromFile reads a schema from a file.
NewSchemaFromObject constructs a schema from a parsed JSON object.
NewSchemaNumberWithFloat creates and returns a new object.
NewSchemaNumberWithInteger creates and returns a new object.
NewSchemaOrBooleanWithBoolean creates and returns a new object.
NewSchemaOrBooleanWithSchema creates and returns a new object.
NewSchemaOrSchemaArrayWithSchema creates and returns a new object.
NewSchemaOrSchemaArrayWithSchemaArray creates and returns a new object.
NewStringOrStringArrayWithString creates and returns a new object.
NewStringOrStringArrayWithStringArray creates and returns a new object.
Render renders a yaml.Node as JSON.

# Structs

NamedSchema is a name-value pair that is used to emulate maps with ordered keys.
NamedSchemaOrStringArray is a name-value pair that is used to emulate maps with ordered keys.
The Schema struct models a JSON Schema and, because schemas are defined hierarchically, contains many references to itself.
SchemaEnumValue represents a value that can be part of an enumeration in a Schema.
SchemaNumber represents a value that can be either an Integer or a Float.
SchemaOrBoolean represents a value that can be either a Schema or a Boolean.
SchemaOrSchemaArray represents a value that can be either a Schema or an Array of Schemas.
SchemaOrStringArray represents a value that can be either a Schema or an Array of Strings.
StringOrStringArray represents a value that can be either a String or an Array of Strings.

# Type aliases

SchemaOperation represents a function that can be applied to a Schema.