Documentation
¶
Overview ¶
Package jsonschema has functionality related to json schema support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schema ¶ added in v0.1.2
type Schema struct { ID string `json:"$id,omitempty"` Schema string `json:"$schema,omitempty"` Title string `json:"title"` Description string `json:"description"` Type Type `json:"type"` Required []string `json:"required"` // @todo make a recursive type of properties. Properties map[string]interface{} `json:"properties"` }
Schema is a json schema definition. It doesn't implement all and may not comply fully. See https://json-schema.org/specification.html
type Type ¶
type Type string
Type is a json schema type.
const ( String Type = "string" Number Type = "number" Integer Type = "integer" Boolean Type = "boolean" Null Type = "null" Object Type = "object" Array Type = "array" Unsupported Type = "UNSUPPORTED" )
Json schema types.
func TypeFromString ¶ added in v0.1.2
TypeFromString creates a Type with enum validation.
func (*Type) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler to parse Json Schema type.
Click to show internal directories.
Click to hide internal directories.