From 62dc8425fdba5467c231efe68e3021cbf46f042b Mon Sep 17 00:00:00 2001 From: featherstone Date: Thu, 28 Feb 2019 21:39:59 +0000 Subject: [PATCH] oAuth2Info is not a required parameter & used oneOf for endpoint --- Mp1.json | 41 +++++++++++++---------------------------- Mp1.yaml | 2 -- 2 files changed, 13 insertions(+), 30 deletions(-) diff --git a/Mp1.json b/Mp1.json index c960089..6c42dc4 100644 --- a/Mp1.json +++ b/Mp1.json @@ -750,21 +750,6 @@ "$ref": "#/components/schemas/EndPointInfo.Uri" } }, - "EndPointInfo": { - "description": "This type represents information about a transport endpoint", - "type": "object", - "properties": { - "uris": { - "$ref": "#/components/schemas/EndPointInfo.Uris" - }, - "addresses": { - "$ref": "#/components/schemas/EndPointInfo.Addresses" - }, - "alternative": { - "$ref": "#/components/schemas/EndPointInfo.Alternative" - } - } - }, "LinkType": { "description": "This type represents a type of link and may be referenced from data structures", "type": "object", @@ -911,9 +896,6 @@ "SecurityInfo": { "description": "This type represents security information related to a transport", "type": "object", - "required": [ - "oAuth2Info" - ], "properties": { "oAuth2Info": { "$ref": "#/components/schemas/SecurityInfo.OAuth2Info" @@ -1518,7 +1500,19 @@ "$ref": "#/components/schemas/TransportInfo.Version" }, "endpoint": { - "$ref": "#/components/schemas/EndPointInfo" + "description": "This type represents information about a transport endpoint", + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/EndPointInfo.Uris" + }, + { + "$ref": "#/components/schemas/EndPointInfo.Addresses" + }, + { + "$ref": "#/components/schemas/EndPointInfo.Alternative" + } + ] }, "security": { "$ref": "#/components/schemas/SecurityInfo" @@ -2227,12 +2221,6 @@ "endpoint": { "uris": [ "/meMp1/service/EntryPoint" - ], - "addresses": [ - { - "host": "192.0.2.0", - "port": 8080 - } ] }, "security": { @@ -2267,9 +2255,6 @@ "protocol": "HTTP", "version": "2.0", "endpoint": { - "uris": [ - "/meMp1/service/EntryPoint" - ], "addresses": [ { "host": "192.0.2.0", diff --git a/Mp1.yaml b/Mp1.yaml index 0990f87..d078e28 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -695,8 +695,6 @@ components: SecurityInfo: description: This type represents security information related to a transport type: object - required: - - oAuth2Info properties: oAuth2Info: $ref: '#/components/schemas/SecurityInfo.OAuth2Info' -- GitLab