File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed
tests/src/test/resources/org/everit/json/schema/issues/issue205 Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " http://json-schema.org/draft-06/schema#" ,
3
+ "id" : " http://hl7.org/fhir/test-json-schema/3.4" ,
4
+ "description" : " for unit tests" ,
5
+ "discriminator" : {
6
+ "propertyName" : " resourceType" ,
7
+ "mapping" : {
8
+ "A" : " #/definitions/A" ,
9
+ "B" : " #/definitions/B"
10
+ }
11
+ },
12
+ "oneOf" : [
13
+ {
14
+ "$ref" : " #/definitions/A"
15
+ },
16
+ {
17
+ "$ref" : " #/definitions/B"
18
+ }
19
+ ],
20
+ "definitions" : {
21
+ "id" : {
22
+ "pattern" : " ^[A-Za-z0-9\\ -\\ .]{1,64}$" ,
23
+ "type" : " string"
24
+ },
25
+ "A" : {
26
+ "properties" : {
27
+ "resourceType" : {
28
+ "const" : " A"
29
+ },
30
+ "id" : {
31
+ "$ref" : " #/definitions/id"
32
+ }
33
+ },
34
+ "required" : [
35
+ " resourceType"
36
+ ]
37
+ },
38
+ "B" : {
39
+ "properties" : {
40
+ "resourceType" : {
41
+ "const" : " B"
42
+ },
43
+ "code" : {
44
+ "$ref" : " #/definitions/id"
45
+ }
46
+ },
47
+ "additionalProperties" : false ,
48
+ "required" : [
49
+ " resourceType" , " code"
50
+ ]
51
+ }
52
+ }
53
+ }
54
+
Original file line number Diff line number Diff line change
1
+ {
2
+ "resourceType" : " A"
3
+ }
You can’t perform that action at this time.
0 commit comments