Skip to content

Commit a8893b3

Browse files
authored
Merge pull request #1506 from json-schema-org/gregsdennis/extract-propertydependencies2
Extract `propertyDependencies`
2 parents 4075f2e + a48fd8d commit a8893b3

File tree

7 files changed

+473
-29
lines changed

7 files changed

+473
-29
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ jsonschema-*.txt
44
relative-json-pointer.html
55
relative-json-pointer.pdf
66
relative-json-pointer.txt
7+
proposals/*.html
78

89
# For the Python enviornment
910
.venv

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ Labels are assigned based on [Sensible Github Labels](https://github.com/Releque
2525
## Authoring and Building
2626

2727
### Specification
28-
To build the spec files to HTML from the Markdown sources, run `npm run build`.
29-
You can also build each individually with `npm run build-core` and `npm run
30-
build-validation`.
28+
To build the spec files to HTML from the Markdown sources, run `npm run
29+
build-all`.
30+
You can also build each individually with `npm run build -- filename.md`
31+
(Example: `npm run build -- jsonschema-core.md`). You can also use wildcards to
32+
build multiple specs at the same time: `npm run build -- jsonschema-*.md`.
3133

3234
The spec is built using [Remark](https://remark.js.org/), a markdown engine with
3335
good support for plugins and lots of existing plugins we can use.

build/build.js

+37-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonschema-core.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ User-Agent: product-name/5.4.1 so-cool-json-schema/1.0.2 curl/7.43.0
16551655
Clients SHOULD be able to make requests with a "From" header so that server
16561656
operators can contact the owner of a potentially misbehaving script.
16571657

1658-
## A Vocabulary for Applying Subschemas
1658+
## A Vocabulary for Applying Subschemas {#applicatorvocab}
16591659

16601660
This section defines a vocabulary of applicator keywords that are RECOMMENDED
16611661
for use as the basis of other vocabularies.
@@ -1793,7 +1793,7 @@ successfully validates against its subschema. Implementations MUST NOT evaluate
17931793
the instance against this keyword, for either validation or annotation
17941794
collection purposes, in such cases.
17951795

1796-
##### `dependentSchemas`
1796+
##### `dependentSchemas` {#dependent-schemas}
17971797

17981798
This keyword specifies subschemas that are evaluated if the instance is an
17991799
object and contains a certain property.
@@ -1807,21 +1807,6 @@ property.
18071807

18081808
Omitting this keyword has the same behavior as an empty object.
18091809

1810-
##### `propertyDependencies`
1811-
1812-
This keyword specifies subschemas that are evaluated if the instance is an
1813-
object and contains a certain property with a certain string value.
1814-
1815-
This keyword's value MUST be an object. Each value in the object MUST be an
1816-
object whose values MUST be valid JSON Schemas.
1817-
1818-
If the outer object key is a property in the instance and the inner object key
1819-
is equal to the value of that property, the entire instance must validate
1820-
against the schema. Its use is dependent on the presence and value of the
1821-
property.
1822-
1823-
Omitting this keyword has the same behavior as an empty object.
1824-
18251810
### Keywords for Applying Subschemas to Child Instances
18261811

18271812
Each of these keywords defines a rule for applying its subschema(s) to child

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"main": "index.js",
77
"scripts": {
88
"lint": "eslint build/",
9-
"build": "npm run build-core && npm run build-validation && npm run build-output",
10-
"build-core": "node build/build.js < jsonschema-core.md > jsonschema-core.html",
11-
"build-validation": "node build/build.js < jsonschema-validation.md > jsonschema-validation.html",
12-
"build-output": "node build/build.js < jsonschema-validation-output-machines.md > jsonschema-validation-output-machines.html"
9+
"build-all": "node build/build.js jsonschema-*.md proposals/*.md",
10+
"build": "node build/build.js"
1311
},
1412
"license": "MIT",
1513
"dependencies": {

0 commit comments

Comments
 (0)