Merge branch 'master' into master
commit
6cdc1b89ce
2
FAQ.md
2
FAQ.md
|
@ -77,7 +77,7 @@ See [#22](https://github.com/epoberezkin/ajv/issues/22), [#125](https://github.c
|
|||
2. When schemas are recursive (or mutually recursive) resolving references would result in self-referencing recursive data-structures that can be difficult to process.
|
||||
3. There are cases when such inlining would also require adding (or modyfing) `id` attribute in the inlined schema fragment to make the resulting schema equivalent.
|
||||
|
||||
There were many conversations about the meaning of `$ref` in [JSON Schema GitHub organisation](https://github.com/json-schema-org). The consesus is that while it is possible to treat `$ref` as schema inclusion with two caveats (above), this interpretation is unnecessary complex. A more efficient approach is to treat `$ref` as a delegation, i.e. a special keyword that validates the current data instance against the referenced schema. The analogy with programming languages is that `$ref` is a function call rather than a macro. See [here](https://github.com/json-schema-org/json-schema-spec/issues/279), for example.
|
||||
There were many conversations about the meaning of `$ref` in [JSON Schema GitHub organisation](https://github.com/json-schema-org). The consensus is that while it is possible to treat `$ref` as schema inclusion with two caveats (above), this interpretation is unnecessary complex. A more efficient approach is to treat `$ref` as a delegation, i.e. a special keyword that validates the current data instance against the referenced schema. The analogy with programming languages is that `$ref` is a function call rather than a macro. See [here](https://github.com/json-schema-org/json-schema-spec/issues/279), for example.
|
||||
|
||||
|
||||
##### How can I generate a schema where `$ref` keywords are replaced with referenced schemas?
|
||||
|
|
|
@ -10,9 +10,10 @@ if [[ -n $TRAVIS_TAG && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then
|
|||
|
||||
git clone https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv-dist.git ../ajv-dist
|
||||
|
||||
mkdir -p ../ajv-dist/dist
|
||||
cp ./dist/* ../ajv-dist/dist
|
||||
cp ./bower.json ../ajv-dist
|
||||
rm -rf ../ajv-dist/dist
|
||||
mkdir ../ajv-dist/dist
|
||||
cp ./dist/ajv.* ../ajv-dist/dist
|
||||
cat bower.json | sed 's/"name": "ajv"/"name": "ajv-dist"/' > ../ajv-dist/bower.json
|
||||
cd ../ajv-dist
|
||||
|
||||
if [[ `git status --porcelain` ]]; then
|
||||
|
|
Loading…
Reference in New Issue