generated from json-schema-org/repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle ref from draft3 to draft4 (#55)
- Loading branch information
1 parent
e23ae02
commit ceb54a7
Showing
40 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
rules/from-draft3/to-draft4/001-ref-and-adjecent-keywords-present.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"vocabulary": "core", | ||
"condition": [ | ||
{ "operation": "has-key", "path": [], "value": "$ref" }, | ||
{ "operation": "type-is", "path": [ {} ], "value": [ "array", "booelan", "integer", "number", "object", "string" ] } | ||
], | ||
"transform": [ | ||
{ "operation": "prefix-until-unique", "path": [ {} ], "value": "x-" } | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
rules/from-draft3/to-draft4/002-ref-and-x-ref-present.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"vocabulary": "core", | ||
"condition": [ | ||
{ "operation": "has-key", "path": [], "value": "$ref" }, | ||
{ "operation": "has-key", "path": [], "value": "x-$ref" } | ||
], | ||
"transform": [ | ||
{ "operation": "prefix-until-unique", "path": [ "x-$ref" ], "value": "x-" } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
rules/from-draft3/to-draft4/003-correct-sideeffects-ref-transform.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"vocabulary": "core", | ||
"condition": [ | ||
{ "operation": "has-key", "path": [], "value": "x-$ref" } | ||
], | ||
"transform": [ | ||
{ "operation": "move", "to": [ "$ref" ], "from": [ "x-$ref" ] } | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[ | ||
{ | ||
"title": "$ref present in schema, with adjacent keywords", | ||
"from": { | ||
"id": "http://example.com", | ||
"properties": { | ||
"foo": { | ||
"$ref": "/bar", | ||
"type": "string", | ||
"id": "zoo" | ||
}, | ||
"bar": { | ||
"id": "bar" | ||
} | ||
} | ||
}, | ||
"to": { | ||
"id": "http://example.com", | ||
"properties": { | ||
"foo": { | ||
"$ref": "/bar", | ||
"x-type": "string", | ||
"x-id": "zoo" | ||
}, | ||
"bar": { | ||
"id": "bar" | ||
} | ||
} | ||
} | ||
} | ||
] |