Skip to content

Commit 5a63546

Browse files
authored
Merge pull request #235 from riscv-software-src/cpp_hart
Avoid using internet for schema fetch
2 parents 1558016 + 457e7b2 commit 5a63546

File tree

5 files changed

+251
-2
lines changed

5 files changed

+251
-2
lines changed

schemas/config_schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3+
34
"$defs": {
45
"params": {
56
"type": "object",

schemas/csr_schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3+
34
"title": "CSR description",
45
"description": "A CSR register specification",
56

schemas/ext_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"description": "When a parameter is defined by multiple extensions, declare the other extensions here. The parameter *must* mean the same thing in all extensions."
2626
},
2727
"schema": {
28-
"$ref": "https://json-schema.org/draft-07/schema#"
28+
"$ref": "json-schema-draft-07.json#"
2929
},
3030
"when": {
3131
"$ref": "schema_defs.json#/$defs/when_condition"
@@ -189,7 +189,7 @@
189189
"type": "object",
190190
"properties": {
191191
"schema": {
192-
"$ref": "https://json-schema.org/draft-07/schema#",
192+
"$ref": "json-schema-draft-07.json#",
193193
"description": "Extra schema constraints for the parameter"
194194
},
195195
"extra_validation": {

schemas/implemented_exts_schema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
24
"type": "object",
35
"properties": {
46
"implemented_extensions": {

schemas/json-schema-draft-07.json

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "http://json-schema.org/draft-07/schema#",
4+
"title": "Core schema meta-schema",
5+
"definitions": {
6+
"schemaArray": {
7+
"type": "array",
8+
"minItems": 1,
9+
"items": {
10+
"$ref": "#"
11+
}
12+
},
13+
"nonNegativeInteger": {
14+
"type": "integer",
15+
"minimum": 0
16+
},
17+
"nonNegativeIntegerDefault0": {
18+
"allOf": [
19+
{
20+
"$ref": "#/definitions/nonNegativeInteger"
21+
},
22+
{
23+
"default": 0
24+
}
25+
]
26+
},
27+
"simpleTypes": {
28+
"enum": [
29+
"array",
30+
"boolean",
31+
"integer",
32+
"null",
33+
"number",
34+
"object",
35+
"string"
36+
]
37+
},
38+
"stringArray": {
39+
"type": "array",
40+
"items": {
41+
"type": "string"
42+
},
43+
"uniqueItems": true,
44+
"default": []
45+
}
46+
},
47+
"type": [
48+
"object",
49+
"boolean"
50+
],
51+
"properties": {
52+
"$id": {
53+
"type": "string",
54+
"format": "uri-reference"
55+
},
56+
"$schema": {
57+
"type": "string",
58+
"format": "uri"
59+
},
60+
"$ref": {
61+
"type": "string",
62+
"format": "uri-reference"
63+
},
64+
"$comment": {
65+
"type": "string"
66+
},
67+
"title": {
68+
"type": "string"
69+
},
70+
"description": {
71+
"type": "string"
72+
},
73+
"default": true,
74+
"readOnly": {
75+
"type": "boolean",
76+
"default": false
77+
},
78+
"writeOnly": {
79+
"type": "boolean",
80+
"default": false
81+
},
82+
"examples": {
83+
"type": "array",
84+
"items": true
85+
},
86+
"multipleOf": {
87+
"type": "number",
88+
"exclusiveMinimum": 0
89+
},
90+
"maximum": {
91+
"type": "number"
92+
},
93+
"exclusiveMaximum": {
94+
"type": "number"
95+
},
96+
"minimum": {
97+
"type": "number"
98+
},
99+
"exclusiveMinimum": {
100+
"type": "number"
101+
},
102+
"maxLength": {
103+
"$ref": "#/definitions/nonNegativeInteger"
104+
},
105+
"minLength": {
106+
"$ref": "#/definitions/nonNegativeIntegerDefault0"
107+
},
108+
"pattern": {
109+
"type": "string",
110+
"format": "regex"
111+
},
112+
"additionalItems": {
113+
"$ref": "#"
114+
},
115+
"items": {
116+
"anyOf": [
117+
{
118+
"$ref": "#"
119+
},
120+
{
121+
"$ref": "#/definitions/schemaArray"
122+
}
123+
],
124+
"default": true
125+
},
126+
"maxItems": {
127+
"$ref": "#/definitions/nonNegativeInteger"
128+
},
129+
"minItems": {
130+
"$ref": "#/definitions/nonNegativeIntegerDefault0"
131+
},
132+
"uniqueItems": {
133+
"type": "boolean",
134+
"default": false
135+
},
136+
"contains": {
137+
"$ref": "#"
138+
},
139+
"maxProperties": {
140+
"$ref": "#/definitions/nonNegativeInteger"
141+
},
142+
"minProperties": {
143+
"$ref": "#/definitions/nonNegativeIntegerDefault0"
144+
},
145+
"required": {
146+
"$ref": "#/definitions/stringArray"
147+
},
148+
"additionalProperties": {
149+
"$ref": "#"
150+
},
151+
"definitions": {
152+
"type": "object",
153+
"additionalProperties": {
154+
"$ref": "#"
155+
},
156+
"default": {}
157+
},
158+
"properties": {
159+
"type": "object",
160+
"additionalProperties": {
161+
"$ref": "#"
162+
},
163+
"default": {}
164+
},
165+
"patternProperties": {
166+
"type": "object",
167+
"additionalProperties": {
168+
"$ref": "#"
169+
},
170+
"propertyNames": {
171+
"format": "regex"
172+
},
173+
"default": {}
174+
},
175+
"dependencies": {
176+
"type": "object",
177+
"additionalProperties": {
178+
"anyOf": [
179+
{
180+
"$ref": "#"
181+
},
182+
{
183+
"$ref": "#/definitions/stringArray"
184+
}
185+
]
186+
}
187+
},
188+
"propertyNames": {
189+
"$ref": "#"
190+
},
191+
"const": true,
192+
"enum": {
193+
"type": "array",
194+
"items": true,
195+
"minItems": 1,
196+
"uniqueItems": true
197+
},
198+
"type": {
199+
"anyOf": [
200+
{
201+
"$ref": "#/definitions/simpleTypes"
202+
},
203+
{
204+
"type": "array",
205+
"items": {
206+
"$ref": "#/definitions/simpleTypes"
207+
},
208+
"minItems": 1,
209+
"uniqueItems": true
210+
}
211+
]
212+
},
213+
"format": {
214+
"type": "string"
215+
},
216+
"contentMediaType": {
217+
"type": "string"
218+
},
219+
"contentEncoding": {
220+
"type": "string"
221+
},
222+
"if": {
223+
"$ref": "#"
224+
},
225+
"then": {
226+
"$ref": "#"
227+
},
228+
"else": {
229+
"$ref": "#"
230+
},
231+
"allOf": {
232+
"$ref": "#/definitions/schemaArray"
233+
},
234+
"anyOf": {
235+
"$ref": "#/definitions/schemaArray"
236+
},
237+
"oneOf": {
238+
"$ref": "#/definitions/schemaArray"
239+
},
240+
"not": {
241+
"$ref": "#"
242+
}
243+
},
244+
"default": true
245+
}

0 commit comments

Comments
 (0)