Skip to content

Commit c0d6238

Browse files
committed
adding integration test for #205
1 parent 11bd6cf commit c0d6238

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"resourceType" : "A"
3+
}

0 commit comments

Comments
 (0)