From e126ebf89088a4d9ae224decb36efebe0607476f Mon Sep 17 00:00:00 2001 From: Ambrus Simon Date: Tue, 31 Oct 2017 13:53:54 -0500 Subject: [PATCH] Do not reference primitive types in rule JSON schema defs --- raml/schemas/definitions/rule.json | 25 +++++++++---------------- raml/schemas/output/rule-list.json | 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/raml/schemas/definitions/rule.json b/raml/schemas/definitions/rule.json index 0b64b6d68..87116de33 100644 --- a/raml/schemas/definitions/rule.json +++ b/raml/schemas/definitions/rule.json @@ -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": { @@ -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" } }, @@ -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" } } diff --git a/raml/schemas/output/rule-list.json b/raml/schemas/output/rule-list.json index c97e91234..fffc98fe8 100644 --- a/raml/schemas/output/rule-list.json +++ b/raml/schemas/output/rule-list.json @@ -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" } }