Versions in this module Expand all Collapse all v0 v0.1.0 Mar 28, 2025 Changes in this version + var ErrInvalidGlob = errors.New(`invalid glob pattern`) + var ErrParsingSchema = errors.New(`could not parse schema`) + var ErrReadFile = errors.New(`cannot read file`) + var ErrUnknownSchema = errors.New("unknown schema") + func DepthMap(roots []*jsonschema.Schema, classes []*domain.Class, ...) map[*domain.Class]int + func NewCompiler(baseURI string) (*jsonschema.Compiler, error) + func ReadSchema(compiler *jsonschema.Compiler, filepath string, strict bool) (*jsonschema.Schema, error) + type Cache interface + HasProcessed func(schema *jsonschema.Schema) bool + Process func(schema *jsonschema.Schema) + Schemas func() []*jsonschema.Schema + type ClassParser struct + func (p *ClassParser) Classes() ([]*domain.Class, error) + func (p *ClassParser) NewClass(schema *jsonschema.Schema) (*domain.Class, error) + func (p *ClassParser) NewProperty(parent *jsonschema.Schema, name string, value *jsonschema.Schema) (*domain.Property, error) + func (p *ClassParser) PropertyRef(parent *jsonschema.Schema, value *jsonschema.Schema) (*jsonschema.Schema, error) + func (p *ClassParser) Relations() ([]*domain.Relation, error) + type Loader func(url string) (io.ReadCloser, error) + func NewFileLoader(workingDirectory string) Loader + type MapCache struct + func (c *MapCache) HasProcessed(schema *jsonschema.Schema) bool + func (c *MapCache) Process(schema *jsonschema.Schema) + func (c *MapCache) Schemas() []*jsonschema.Schema + type Parser struct + BaseURI string + Cache Cache + Compiler *jsonschema.Compiler + Depth int + Globs []string + StrictMode bool + func NewParser(globs ...string) *Parser + func (p *Parser) Classes() ([]*domain.Class, error) + func (p *Parser) Relations() ([]*domain.Relation, error) + func (p *Parser) Schemas() ([]*jsonschema.Schema, error) + func (p *Parser) SetBaseURI(baseURI string) *Parser + func (p *Parser) SetDepth(depth int) *Parser + type Reference struct + From *jsonschema.Schema + FromParent *jsonschema.Schema + To *jsonschema.Schema + ToParent *jsonschema.Schema + Type ReferenceType + type ReferenceType string + const AllOf + const AnyOf + const OneOf + const Ref