Skip to content

Commit 3d3b322

Browse files
committed
Do not reference primitive types in rule JSON schema defs
1 parent e86455d commit 3d3b322

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

raml/schemas/definitions/rule.json

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
33
"definitions": {
4-
"_id": { "type": "string" },
5-
"project_id": { "type": "string" },
6-
"alg": { "type": "string" },
7-
"name": { "type": "string" },
8-
"config": { "type": "object" },
9-
104
"rule-items": {
115
"type": "array",
126
"items": {
@@ -29,15 +23,14 @@
2923
}
3024
},
3125

32-
3326
"rule-input": {
3427
"type": "object",
3528
"properties": {
36-
"_id": { "$ref": "#/definitions/_id" },
37-
"project_id": { "$ref": "#/definitions/project_id" },
38-
"alg": { "$ref": "#/definitions/alg" },
39-
"name": { "$ref": "#/definitions/name" },
40-
"config": { "$ref": "#/definitions/config" },
29+
"_id": { "type": "string" },
30+
"project_id": { "type": "string" },
31+
"alg": { "type": "string" },
32+
"name": { "type": "string" },
33+
"config": { "type": "object" },
4134
"any": { "$ref": "#/definitions/rule-items" },
4235
"all": { "$ref": "#/definitions/rule-items" }
4336
},
@@ -47,10 +40,10 @@
4740
"rule-output": {
4841
"type": "object",
4942
"properties": {
50-
"_id": { "$ref": "#/definitions/_id" },
51-
"alg": { "$ref": "#/definitions/alg" },
52-
"name": { "$ref": "#/definitions/name" },
53-
"config": { "$ref": "#/definitions/config" },
43+
"_id": { "type": "string" },
44+
"alg": { "type": "string" },
45+
"name": { "type": "string" },
46+
"config": { "type": "object" },
5447
"any": { "$ref": "#/definitions/rule-items" },
5548
"all": { "$ref": "#/definitions/rule-items" }
5649
}

raml/schemas/output/rule-list.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
33
"type": "array",
4-
"items": { "$ref":"../definitions/rule.json#/definitions/rule-output" }
4+
"items": { "$ref": "../definitions/rule.json#/definitions/rule-output" }
55
}

0 commit comments

Comments
 (0)