Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/hyper-schema #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions draft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/santhosh-tekuri/jsonschema/v5
module github.com/bmeg/jsonschema/v5

go 1.19