Skip to content

Commit

Permalink
using $id and root $ref
Browse files Browse the repository at this point in the history
  • Loading branch information
erosb committed Oct 25, 2023
1 parent eee0563 commit 9be04e5
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/test/kotlin/com/github/erosb/jsonsKema/DynamicRefTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ class DynamicRefTest {
val schema = createSchemaLoaderForString(
"""
{
"type": "object",
"properties": {
"intList": {
"$ref": "#/$defs/List",
"$defs": {
"elemType": {
"$dynamicAnchor": "elemType",
"type": "integer"
"$id": "https://test.json-schema.org/typical-dynamic-resolution/root",
"$ref": "#/$defs/root",
"$defs": {
"root": {
"type": "object",
"properties": {
"intList": {
"$ref": "#/$defs/List",
"$defs": {
"elemType": {
"$dynamicAnchor": "elemType",
"type": "integer"
}
}
}
}
}
}
"$defs": {
},
"List": {
"type": "array",
"items": {
Expand Down

0 comments on commit 9be04e5

Please sign in to comment.