Skip to content

Commit

Permalink
refactor(schema): track keyword $ref
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Dec 16, 2019
1 parent 07bb52f commit 0982f31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/schemaProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const handler = ({
return loadExamples(receiver[symbols.filename], 1);
}
if (typeof retval === 'object' && retval !== null) {
if (retval.$ref) {
if (retval[keyword`$ref`]) {
const [uri, pointer] = retval.$ref.split('#');
// console.log('resolving ref', uri, pointer, 'from', receiver[symbols.filename]);
const basedoc = uri || receiver[symbols.id];
Expand Down
6 changes: 3 additions & 3 deletions schemasupport.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# JSON Schema Spec Coverage Report

This report lists the keywords of the JSON Schema spec that are covered in the tests. The overall coverage is 80%
This report lists the keywords of the JSON Schema spec that are covered in the tests. The overall coverage is 81%

## The JSON Schema Core Vocabulary

Coverage for [The JSON Schema Core Vocabulary](https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.8.1) is 22%.
Coverage for [The JSON Schema Core Vocabulary](https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.8.1) is 33%.

| Keyword | Supported |
| :----------------- | --------- |
Expand All @@ -14,7 +14,7 @@ Coverage for [The JSON Schema Core Vocabulary](https://json-schema.org/draft/201
| `$id` | Yes |
| `$recursiveAnchor` | No |
| `$recursiveRef` | No |
| `$ref` | No |
| `$ref` | Yes |
| `$schema` | No |
| `$vocabulary` | No |

Expand Down

0 comments on commit 0982f31

Please sign in to comment.