-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: respect definitions for all when inlining nullable references (#417
- Loading branch information
1 parent
ea90e6c
commit 1aced59
Showing
12 changed files
with
415 additions
and
180 deletions.
There are no files selected for viewing
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
38 changes: 28 additions & 10 deletions
38
...es/com/github/victools/jsonschema/generator/circular-custom-definition-DRAFT_2019_09.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 |
---|---|---|
@@ -1,28 +1,46 @@ | ||
{ | ||
"$defs": { | ||
"List(TestCircularClass1)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
} | ||
} | ||
}, | ||
"List(TestCircularClass2)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/$defs/TestCircularClass2" | ||
} | ||
} | ||
}, | ||
"TestCircularClass2": { | ||
"type": "object", | ||
"properties": { | ||
"list1": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/$defs/List(TestCircularClass1)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"list2": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/$defs/TestCircularClass2" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/$defs/List(TestCircularClass2)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
38 changes: 28 additions & 10 deletions
38
...es/com/github/victools/jsonschema/generator/circular-custom-definition-DRAFT_2020_12.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 |
---|---|---|
@@ -1,28 +1,46 @@ | ||
{ | ||
"$defs": { | ||
"List(TestCircularClass1)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
} | ||
} | ||
}, | ||
"List(TestCircularClass2)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/$defs/TestCircularClass2" | ||
} | ||
} | ||
}, | ||
"TestCircularClass2": { | ||
"type": "object", | ||
"properties": { | ||
"list1": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/$defs/List(TestCircularClass1)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"list2": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/$defs/TestCircularClass2" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/$defs/List(TestCircularClass2)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
38 changes: 28 additions & 10 deletions
38
...esources/com/github/victools/jsonschema/generator/circular-custom-definition-DRAFT_6.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 |
---|---|---|
@@ -1,28 +1,46 @@ | ||
{ | ||
"definitions": { | ||
"List(TestCircularClass1)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
} | ||
} | ||
}, | ||
"List(TestCircularClass2)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/definitions/TestCircularClass2" | ||
} | ||
} | ||
}, | ||
"TestCircularClass2": { | ||
"type": "object", | ||
"properties": { | ||
"list1": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/definitions/List(TestCircularClass1)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"list2": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/definitions/TestCircularClass2" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/definitions/List(TestCircularClass2)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
38 changes: 28 additions & 10 deletions
38
...esources/com/github/victools/jsonschema/generator/circular-custom-definition-DRAFT_7.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 |
---|---|---|
@@ -1,28 +1,46 @@ | ||
{ | ||
"definitions": { | ||
"List(TestCircularClass1)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
} | ||
} | ||
}, | ||
"List(TestCircularClass2)": { | ||
"type": "object", | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/definitions/TestCircularClass2" | ||
} | ||
} | ||
}, | ||
"TestCircularClass2": { | ||
"type": "object", | ||
"properties": { | ||
"list1": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/definitions/List(TestCircularClass1)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"list2": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"get(0)": { | ||
"$ref": "#/definitions/TestCircularClass2" | ||
"anyOf": [ | ||
{ | ||
"type": "null" | ||
}, { | ||
"$ref": "#/definitions/List(TestCircularClass2)" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.