Skip to content

Commit

Permalink
reserve "$vocabulary" keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Nov 9, 2020
1 parent 694ad62 commit 9a9e524
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/vocabularies/applicator/additionalItems.ts
Expand Up @@ -22,7 +22,7 @@ const def: CodeKeywordDefinition = {
const {gen, schema, parentSchema, data, it} = cxt
const {items} = parentSchema
if (!Array.isArray(items)) {
checkStrictMode(it, '"additionalItems" is ignored when "items" is not an array')
checkStrictMode(it, '"additionalItems" is ignored when "items" is not an array of schemas')
return
}
it.items = true
Expand Down
10 changes: 9 additions & 1 deletion lib/vocabularies/core/index.ts
Expand Up @@ -2,6 +2,14 @@ import type {Vocabulary} from "../../types"
import idKeyword from "./id"
import refKeyword from "./ref"

const core: Vocabulary = ["$schema", "$id", "$defs", "definitions", idKeyword, refKeyword]
const core: Vocabulary = [
"$schema",
"$id",
"$defs",
"$vocabulary",
"definitions",
idKeyword,
refKeyword,
]

export default core

0 comments on commit 9a9e524

Please sign in to comment.