Skip to content

Commit

Permalink
Do not reference primitive types in rule JSON schema defs
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrussimon committed Oct 31, 2017
1 parent 2d7b6df commit e126ebf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
25 changes: 9 additions & 16 deletions raml/schemas/definitions/rule.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"_id": { "type": "string" },
"project_id": { "type": "string" },
"alg": { "type": "string" },
"name": { "type": "string" },
"config": { "type": "object" },

"rule-items": {
"type": "array",
"items": {
Expand All @@ -29,15 +23,14 @@
}
},


"rule-input": {
"type": "object",
"properties": {
"_id": { "$ref": "#/definitions/_id" },
"project_id": { "$ref": "#/definitions/project_id" },
"alg": { "$ref": "#/definitions/alg" },
"name": { "$ref": "#/definitions/name" },
"config": { "$ref": "#/definitions/config" },
"_id": { "type": "string" },
"project_id": { "type": "string" },
"alg": { "type": "string" },
"name": { "type": "string" },
"config": { "type": "object" },
"any": { "$ref": "#/definitions/rule-items" },
"all": { "$ref": "#/definitions/rule-items" }
},
Expand All @@ -47,10 +40,10 @@
"rule-output": {
"type": "object",
"properties": {
"_id": { "$ref": "#/definitions/_id" },
"alg": { "$ref": "#/definitions/alg" },
"name": { "$ref": "#/definitions/name" },
"config": { "$ref": "#/definitions/config" },
"_id": { "type": "string" },
"alg": { "type": "string" },
"name": { "type": "string" },
"config": { "type": "object" },
"any": { "$ref": "#/definitions/rule-items" },
"all": { "$ref": "#/definitions/rule-items" }
}
Expand Down
2 changes: 1 addition & 1 deletion raml/schemas/output/rule-list.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": { "$ref":"../definitions/rule.json#/definitions/rule-output" }
"items": { "$ref": "../definitions/rule.json#/definitions/rule-output" }
}

0 comments on commit e126ebf

Please sign in to comment.