Skip to content

Commit 0a0ed54

Browse files
suprith-hubjviotti
andauthored
Add ref case for Draft 6 to Draft 7 transform (#53)
Co-authored-by: Juan Cruz Viotti <[email protected]>
1 parent 3a57333 commit 0a0ed54

13 files changed

+60
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"vocabulary": "core",
3+
"condition": [
4+
{ "operation": "has-key", "path": [], "value": "$ref" },
5+
{ "operation": "type-is", "path": [ {} ], "value": [ "array", "boolean", "integer", "number", "object", "string" ] }
6+
],
7+
"transform": [
8+
{ "operation": "prefix-until-unique", "path": [ {} ], "value": "x-" }
9+
]
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"vocabulary": "core",
3+
"condition": [
4+
{ "operation": "has-key", "path": [], "value": "$ref" },
5+
{ "operation": "has-key", "path": [], "value": "x-$ref" }
6+
],
7+
"transform": [
8+
{ "operation": "prefix-until-unique", "path": [ "x-$ref" ], "value": "x-" }
9+
]
10+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"vocabulary": "core",
3+
"condition": [
4+
{ "operation": "has-key", "path": [], "value": "x-$ref" }
5+
],
6+
"transform": [
7+
{ "operation": "move", "to": [ "$ref" ], "from": [ "x-$ref" ] }
8+
]
9+
}
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.

0 commit comments

Comments
 (0)