schemastore

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store holds a parsed SchemaStore catalog and resolves file paths to schema locations. When backed by a local clone, schemas resolve to local files first. Otherwise, schemas are fetched remotely and cached locally.

func Open

func Open(bundlePath string) (*Store, error)

Open reads the SchemaStore catalog from bundlePath and returns a Store. The bundlePath should be the root of a SchemaStore clone or download containing src/api/json/catalog.json and src/schemas/json/*.json.

func OpenEmbedded added in v2.2.0

func OpenEmbedded() (*Store, error)

OpenEmbedded creates a Store from the embedded SchemaStore catalog. Schemas resolve to remote URLs since no local clone is available.

func (*Store) Resolve added in v2.2.0

func (s *Store) Resolve(filePath string) (string, bool)

Lookup matches a file path against the catalog and returns a schema location. Resolution order: local clone → cache → remote URL. Remote schemas are cached locally for subsequent runs.

Jump to

Keyboard shortcuts

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