forked from adobe/jsonschema2md
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomplex.schema.json
123 lines (123 loc) · 3.11 KB
/
complex.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"meta:license": [
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
],
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "https://example.com/schemas/complex",
"title": "Complex References",
"type": "object",
"description": "This is an example schema that uses types defined in other schemas.",
"properties": {
"refabstract": {
"$ref": "https://example.com/schemas/abstract#/definitions/first",
"version": "1.0.0",
"testProperty": "test"
},
"refnamed": {
"$ref": "https://example.com/schemas/simple",
"version": "1.0.0",
"testProperty": "test"
},
"refrefed": {
"$ref": "#/properties/refnamed",
"version": "1.0.0",
"testProperty": "test"
},
"refobj": {
"type": "object",
"properties": {
"foo": {
"$ref": "https://example.com/schemas/simple",
"version": "1.0.0",
"testProperty": "test"
}
},
"version": "1.0.0",
"testProperty": "test"
},
"refnestedobj": {
"type": "object",
"properties": {
"refobj": {
"type": "object",
"version": "1.0.0",
"testProperty": "test",
"properties": {
"foo": {
"$ref": "https://example.com/schemas/simple",
"version": "1.0.0",
"testProperty": "test"
}
}
}
},
"version": "1.0.0",
"testProperty": "test"
},
"reflocalfile": {
"$ref": "simple.schema.json#",
"version": "1.0.0",
"testProperty": "test"
},
"reflocalfiledef": {
"type": "object",
"version": "1.0.0",
"testProperty": "test",
"properties": {
"third": {
"$ref": "file://extending.schema.json#/definitions/third",
"version": "1.0.0",
"testProperty": "test"
}
}
},
"or": {
"description": "String or number…",
"anyOf": [
{ "type":"string" },
{ "type":"number", "minimum": 0}
],
"version": "1.0.0",
"testProperty": "test"
},
"and": {
"description": "Number in a range",
"allOf": [
{ "type":"number", "maximum": 10 },
{ "type":"number", "minimum": 0}
],
"version": "1.0.0",
"testProperty": "test"
},
"xor": {
"description": "Exclusive choice.",
"oneOf": [
{ "type":"number", "maximum": 0 },
{ "type":"number", "minimum": 10}
],
"version": "1.0.0",
"testProperty": "test"
}
},
"required": [
"refabstract"
],
"additionalProperties": {
"type":"boolean"
},
"patternProperties": {
"int.*": {
"type": "integer",
"version": "1.0.0",
"testProperty": "test"
},
"str.*": {
"type":"string",
"version": "1.0.0",
"testProperty": "test"
}
}
}