jsonschema

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfoSchema

type InfoSchema struct {
	AllowToken  int                    `json:"allowToken"`
	Description string                 `json:"description"`
	Method      string                 `json:"method"`
	Name        string                 `json:"name"`
	Parameters  *JSONSchema            `json:"parameters"`
	Returns     *JSONSchema            `json:"returns"`
	Permissions map[string]interface{} `json:"permissions"`
	Protected   int                    `json:"protected"`
}

type JSONSchema

type JSONSchema struct {
	AdditionalProperties *SchemaOrBool          `json:"additionalProperties"`
	Description          string                 `json:"description"`
	Properties           map[string]*JSONSchema `json:"properties"`
	Default              interface{}            `json:"default"`
	Type                 *SchemaOrString        `json:"type"`
	Items                *JSONSchema            `json:"items"`
	Links                []*Link                `json:"links"`
	Optional             SpecialBool            `json:"optional"`
	TypeText             string                 `json:"typeText"`
}
type Link struct {
	Href string `json:"href"`
	Rel  string `json:"rel"`
}

type Schema

type Schema struct {
	Children []*Schema              `json:"children"`
	Info     map[string]*InfoSchema `json:"info"`
	Leaf     int                    `json:"leaf"`
	Path     string                 `json:"path"`
	Text     string                 `json:"text"`
}

type SchemaOrBool

type SchemaOrBool struct {
	Schema *JSONSchema
	Bool   SpecialBool
}

func (*SchemaOrBool) UnmarshalJSON

func (s *SchemaOrBool) UnmarshalJSON(data []byte) error

type SchemaOrString

type SchemaOrString struct {
	Schema *JSONSchema
	String string
}

func (*SchemaOrString) UnmarshalJSON

func (s *SchemaOrString) UnmarshalJSON(data []byte) error

type SpecialBool

type SpecialBool bool

func (*SpecialBool) UnmarshalJSON

func (s *SpecialBool) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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