diff --git a/cmd/jv/go.mod b/cmd/jv/go.mod index c792148..84e1c6f 100644 --- a/cmd/jv/go.mod +++ b/cmd/jv/go.mod @@ -1,8 +1,8 @@ -module github.com/santhosh-tekuri/jsonschema/cmd/jv +module github.com/bmeg/jsonschema/cmd/jv go 1.15 require ( - github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 + github.com/bmeg/jsonschema/v5 v5.3.1 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/cmd/jv/main.go b/cmd/jv/main.go index 25c5b75..c6f8f8e 100644 --- a/cmd/jv/main.go +++ b/cmd/jv/main.go @@ -11,8 +11,8 @@ import ( "path/filepath" "strings" - "github.com/santhosh-tekuri/jsonschema/v5" - _ "github.com/santhosh-tekuri/jsonschema/v5/httploader" + "github.com/bmeg/jsonschema/v5" + _ "github.com/bmeg/jsonschema/v5/httploader" "gopkg.in/yaml.v3" ) diff --git a/draft.go b/draft.go index 154fa58..5450bb6 100644 --- a/draft.go +++ b/draft.go @@ -225,6 +225,27 @@ var ( "https://json-schema.org/draft/2020-12/vocab/validation", }, } + Draft2020HyperSchema = &Draft{ + version: 2020, + id: "$id", + boolSchema: true, + vocab: []string{ + "https://json-schema.org/draft/2020-12/vocab/core", + "https://json-schema.org/draft/2020-12/vocab/applicator", + "https://json-schema.org/draft/2020-12/vocab/unevaluated", + "https://json-schema.org/draft/2020-12/vocab/validation", + "https://json-schema.org/draft/2020-12/vocab/meta-data", + "https://json-schema.org/draft/2020-12/vocab/format-annotation", + "https://json-schema.org/draft/2020-12/vocab/content", + "https://json-schema.org/draft/2019-09/vocab/hyper-schema", + }, + defaultVocab: []string{ + "https://json-schema.org/draft/2020-12/vocab/core", + "https://json-schema.org/draft/2020-12/vocab/applicator", + "https://json-schema.org/draft/2020-12/vocab/unevaluated", + "https://json-schema.org/draft/2020-12/vocab/validation", + }, + } latest = Draft2020 ) @@ -241,6 +262,8 @@ func findDraft(url string) *Draft { return latest case "https://json-schema.org/draft/2020-12/schema": return Draft2020 + case "https://json-schema.org/draft/2020-12/hyper-schema": + return Draft2020HyperSchema case "https://json-schema.org/draft/2019-09/schema": return Draft2019 case "https://json-schema.org/draft-07/schema": diff --git a/go.mod b/go.mod index a748b29..9207ed0 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/santhosh-tekuri/jsonschema/v5 +module github.com/bmeg/jsonschema/v5 go 1.19 diff --git a/httploader/httploader.go b/httploader/httploader.go index 4198cfe..53dbb35 100644 --- a/httploader/httploader.go +++ b/httploader/httploader.go @@ -4,8 +4,6 @@ // registering its Loaders. // // To use httploader, link this package into your program: -// -// import _ "github.com/santhosh-tekuri/jsonschema/v5/httploader" package httploader import ( @@ -13,7 +11,7 @@ import ( "io" "net/http" - "github.com/santhosh-tekuri/jsonschema/v5" + "github.com/bmeg/jsonschema/v5" ) // Client is the default HTTP Client used to Get the resource. diff --git a/schema_test.go b/schema_test.go index b37546f..6b112a9 100644 --- a/schema_test.go +++ b/schema_test.go @@ -17,8 +17,8 @@ import ( "strings" "testing" + _ "github.com/bmeg/jsonschema/v5/httploader" "github.com/santhosh-tekuri/jsonschema/v5" - _ "github.com/santhosh-tekuri/jsonschema/v5/httploader" ) var skipTests = map[string]map[string][]string{