From c1f6f1d53f7c744b059fb89719b1574b417675ec Mon Sep 17 00:00:00 2001 From: Brian Walsh Date: Wed, 29 Nov 2023 15:06:19 -0800 Subject: [PATCH 1/2] Adds hyper-schema --- draft.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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": From d2704d85a3d7493dae7b11562facfede57d23a42 Mon Sep 17 00:00:00 2001 From: Brian Walsh Date: Wed, 29 Nov 2023 15:16:42 -0800 Subject: [PATCH 2/2] update branch --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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