diff --git a/Mp1.json b/Mp1.json index 97aed2f5439e8e079add3db5d7b5660da99f29f8..53523b00d30f59325a96e8bc4e21bfb9264baeef 100644 --- a/Mp1.json +++ b/Mp1.json @@ -324,7 +324,7 @@ } }, "requestBody": { - "$ref": "#/components/requestBodies/Services" + "$ref": "#/components/requestBodies/Services.Post" } } }, @@ -1035,6 +1035,7 @@ "ServiceInfo.TransportId": { "description": "Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.", "type": "string", + "writeOnly": true, "example": "Rest1" }, "ServiceInfo.Version": { @@ -1042,7 +1043,7 @@ "type": "string", "example": "ServiceVersion1" }, - "ServiceInfo": { + "ServiceInfo.Post": { "description": "This type represents the general information of a mobile edge service.", "type": "object", "required": [ @@ -1051,6 +1052,18 @@ "state", "serializer" ], + "oneOf": [ + { + "required": [ + "transportId" + ] + }, + { + "required": [ + "transportInfo" + ] + } + ], "properties": { "serInstanceId": { "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" @@ -1078,6 +1091,40 @@ } } }, + "ServiceInfo": { + "description": "This type represents the general information of a mobile edge service.", + "type": "object", + "required": [ + "serName", + "version", + "state", + "transportInfo", + "serializer" + ], + "properties": { + "serInstanceId": { + "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" + }, + "serName": { + "$ref": "#/components/schemas/ServiceInfo.SerName" + }, + "serCategory": { + "$ref": "#/components/schemas/CategoryRef" + }, + "version": { + "$ref": "#/components/schemas/ServiceInfo.Version" + }, + "state": { + "$ref": "#/components/schemas/ServiceInfo.State" + }, + "transportInfo": { + "$ref": "#/components/schemas/TransportInfo" + }, + "serializer": { + "$ref": "#/components/schemas/SerializerTypes" + } + } + }, "Subscription": { "description": "A link to the related subscription", "type": "object", @@ -1957,6 +2004,11 @@ } } } + }, + "links": { + "getTransportInfo": { + "$ref": "#/components/links/GetTransportInfo" + } } }, "Error.400": { @@ -2067,6 +2119,17 @@ "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", "required": true }, + "Services.Post": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceInfo.Post" + } + } + }, + "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "required": true + }, "ServicesServiceId": { "content": { "application/json": { @@ -2172,6 +2235,13 @@ "trafficRuleId": "$response.body#/trafficRuleId" } }, + "GetTransportInfo": { + "operationId": "AppServices_POST", + "description": "The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported", + "parameters": { + "transportId": "$response.body#/0/id" + } + }, "GetIndividualMeMp1Subscription": { "operationId": "ApplicationsSubscription_GET", "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", @@ -2240,7 +2310,6 @@ }, "version": "ServiceVersion1", "state": "ACTIVE", - "transportId": "Rest1", "transportInfo": { "id": "TransId12345", "name": "REST", @@ -2276,7 +2345,6 @@ }, "version": "ServiceVersion1", "state": "ACTIVE", - "transportId": "Rest1", "transportInfo": { "id": "TransId12345", "name": "REST", diff --git a/Mp1.yaml b/Mp1.yaml index 9ecfee173eff7cccc5b7977b4b34610f1f3fe03f..0d346f6f21179214951b2e094021096ec71c6a26 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -227,7 +227,7 @@ paths: '404': $ref: '#/components/responses/Error.404' requestBody: - $ref: '#/components/requestBodies/Services' + $ref: '#/components/requestBodies/Services.Post' '/services/{serviceId}': parameters: - $ref: '#/components/parameters/Path.ServiceId' @@ -776,7 +776,7 @@ components: - JSON - XML - PROTOBUF3 - example: JSON + example: 'JSON' ServiceInfo.SerInstanceId: description: >- Identifier of the service instance assigned by the MEPM / mobile edge @@ -805,12 +805,13 @@ components: platform-provided transport for the service, and shall be absent otherwise. type: string + writeOnly: true example: 'Rest1' ServiceInfo.Version: description: Service version type: string example: 'ServiceVersion1' - ServiceInfo: + ServiceInfo.Post: description: This type represents the general information of a mobile edge service. type: object required: @@ -818,6 +819,9 @@ components: - version - state - serializer + oneOf: + - required: [transportId] + - required: [transportInfo] properties: serInstanceId: $ref: '#/components/schemas/ServiceInfo.SerInstanceId' @@ -835,6 +839,30 @@ components: $ref: '#/components/schemas/TransportInfo' serializer: $ref: '#/components/schemas/SerializerTypes' + ServiceInfo: + description: This type represents the general information of a mobile edge service. + type: object + required: + - serName + - version + - state + - transportInfo + - serializer + properties: + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serCategory: + $ref: '#/components/schemas/CategoryRef' + version: + $ref: '#/components/schemas/ServiceInfo.Version' + state: + $ref: '#/components/schemas/ServiceInfo.State' + transportInfo: + $ref: '#/components/schemas/TransportInfo' + serializer: + $ref: '#/components/schemas/SerializerTypes' Subscription: description: A link to the related subscription type: object @@ -1527,6 +1555,9 @@ components: minItems: 0 items: $ref: '#/components/schemas/TransportInfo' + links: + getTransportInfo: + $ref: '#/components/links/GetTransportInfo' Error.400: description: Bad Request content: @@ -1595,6 +1626,15 @@ components: New ServiceInfo with updated "state" is included as entity body of the request required: true + Services.Post: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo.Post' + description: >- + New ServiceInfo with updated "state" is included as entity body of the + request + required: true ServicesServiceId: content: application/json: @@ -1664,6 +1704,11 @@ components: description: The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `PUT /applications/{appInstanceId}/traffic_rules/{trafficRuleId}` parameters: trafficRuleId: '$response.body#/trafficRuleId' + GetTransportInfo: + operationId: AppServices_POST + description: The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported + parameters: + transportId: '$response.body#/0/id' GetIndividualMeMp1Subscription: operationId: ApplicationsSubscription_GET description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}` @@ -1716,7 +1761,6 @@ components: version: 'version1' version: 'ServiceVersion1' state: 'ACTIVE' - transportId: 'Rest1' transportInfo: id: 'TransId12345' name: 'REST' @@ -1743,7 +1787,6 @@ components: version: 'version1' version: 'ServiceVersion1' state: 'ACTIVE' - transportId: 'Rest1' transportInfo: id: 'TransId12345' name: 'REST'