From d239659cad5e154bb67a2aa892564f3d78984bd1 Mon Sep 17 00:00:00 2001 From: Jose Manuel Cantera Date: Tue, 20 Nov 2018 16:31:20 +0100 Subject: [PATCH] Refactoring to make things easier for OAS --- schema/EntityList.json | 15 +++++++++++---- schema/subscriptions/Notification.json | 2 +- spec/updated/entities-spec.json | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/schema/EntityList.json b/schema/EntityList.json index 6c4ed68..94d1c47 100644 --- a/schema/EntityList.json +++ b/schema/EntityList.json @@ -3,8 +3,15 @@ "id": "https://uri.etsi.org/ngsi-ld/schema/EntityList.json", "title": "NGSI-LD EntityList", "description": "NGSI-LD EntityList", - "type": "array", - "items": { - "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#" - } + "definitions": { + "EntityList": { + "type": "array", + "items": { + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Entity" + } + } + }, + "allOf": [{ + "$ref": "#/definitions/EntityList" + }] } diff --git a/schema/subscriptions/Notification.json b/schema/subscriptions/Notification.json index d73ed76..6d27e50 100644 --- a/schema/subscriptions/Notification.json +++ b/schema/subscriptions/Notification.json @@ -27,7 +27,7 @@ "data": { "type": "array", "items": { - "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#" + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Entity" }, "minItems": 1 } diff --git a/spec/updated/entities-spec.json b/spec/updated/entities-spec.json index 346e416..836905b 100644 --- a/spec/updated/entities-spec.json +++ b/spec/updated/entities-spec.json @@ -191,7 +191,7 @@ "content": { "application/json;application/ld+json": { "schema": { - "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#" + "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Entity" } } } -- GitLab