cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft2020-12/optional/dynamicRef.json (about)

     1  [
     2  	{
     3  		"description": "$dynamicRef skips over intermediate resources - pointer reference across resource boundary",
     4  		"schema": {
     5  			"$schema": "https://json-schema.org/draft/2020-12/schema",
     6  			"$id": "https://test.json-schema.org/dynamic-ref-skips-intermediate-resource/optional/main",
     7  			"type": "object",
     8  			"properties": {
     9  				"bar-item": {
    10  					"$ref": "bar#/$defs/item"
    11  				}
    12  			},
    13  			"$defs": {
    14  				"bar": {
    15  					"$id": "bar",
    16  					"type": "array",
    17  					"items": {
    18  						"$ref": "item"
    19  					},
    20  					"$defs": {
    21  						"item": {
    22  							"$id": "item",
    23  							"type": "object",
    24  							"properties": {
    25  								"content": {
    26  									"$dynamicRef": "#content"
    27  								}
    28  							},
    29  							"$defs": {
    30  								"defaultContent": {
    31  									"$dynamicAnchor": "content",
    32  									"type": "integer"
    33  								}
    34  							}
    35  						},
    36  						"content": {
    37  							"$dynamicAnchor": "content",
    38  							"type": "string"
    39  						}
    40  					}
    41  				}
    42  			}
    43  		},
    44  		"skip": {
    45  			"v2": "extract error: keyword \"$dynamicRef\" not yet implemented (and 5 more errors)",
    46  			"v3": "extract error: keyword \"$dynamicRef\" not yet implemented (and 5 more errors)"
    47  		},
    48  		"tests": [
    49  			{
    50  				"description": "integer property passes",
    51  				"data": {
    52  					"bar-item": {
    53  						"content": 42
    54  					}
    55  				},
    56  				"valid": true,
    57  				"skip": {
    58  					"v2": "could not compile schema",
    59  					"v3": "could not compile schema"
    60  				}
    61  			},
    62  			{
    63  				"description": "string property fails",
    64  				"data": {
    65  					"bar-item": {
    66  						"content": "value"
    67  					}
    68  				},
    69  				"valid": false,
    70  				"skip": {
    71  					"v2": "could not compile schema",
    72  					"v3": "could not compile schema"
    73  				}
    74  			}
    75  		]
    76  	}
    77  ]