File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
java/com/networknt/schema Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .networknt .schema ;
2+
3+ import com .fasterxml .jackson .databind .JsonNode ;
4+ import org .junit .Test ;
5+
6+ /**
7+ * Created by stevehu on 2016-12-20.
8+ */
9+ public class SelfRefTest extends BaseJsonSchemaValidatorTest {
10+ @ Test
11+ public void testSelfRef () throws Exception {
12+ JsonNode node = getJsonNodeFromClasspath ("selfref.json" );
13+ System .out .println ("node = " + node );
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " object" ,
3+ "properties" : {
4+ "name" : {
5+ "type" : " string"
6+ },
7+ "tree" : {
8+ "$ref" : " #/definitions/tree"
9+ }
10+ },
11+ "definitions" : {
12+ "tree" : {
13+ "type" : " object" ,
14+ "properties" : {
15+ "value" : {
16+ "type" : " string"
17+ },
18+ "branches" : {
19+ "type" : " array" ,
20+ "items" : {
21+ "$ref" : " #/definitions/tree"
22+ },
23+ "minItems" : 1
24+ }
25+ },
26+ "required" : [
27+ " value"
28+ ]
29+ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments