diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..3b664107303df336bab8010caad42ddaed24550e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/Mp1.json b/Mp1.json index 431733496fc0a6bfd27f11be83baf179a1c51dc3..387f66bd22ec69a273362fec943e96042ded40dd 100644 --- a/Mp1.json +++ b/Mp1.json @@ -10,7 +10,7 @@ ], "info": { "title": "Mp1 API", - "version": "1.1.1", + "version": "2.0.5", "description": "The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI", "license": { "name": "ETSI Forge copyright notice", @@ -21,8 +21,8 @@ } }, "externalDocs": { - "description": "ETSI GS MEC011 Application Enablement API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf" + "description": "ETSI GS MEC011 Application Enablement API, V2.0.5", + "url": "https://docbox.etsi.org/ISG/MEC/70-Draft/0011v211Plat.App.Enabl/MEC-0011v211Plat.App.Enablv205.zip" }, "tags": [ { @@ -332,10 +332,15 @@ } } }, - "/services": { + "/applications/{appInstanceId}/services": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + } + ], "get": { "description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure", - "operationId": "Services_GET", + "operationId": "AppServices_GET", "tags": [ "services" ], @@ -348,6 +353,15 @@ }, { "$ref": "#/components/parameters/Query.Ser_category_id" + }, + { + "$ref": "#/components/parameters/Query.Consumed_local_only" + }, + { + "$ref": "#/components/parameters/Query.Is_local" + }, + { + "$ref": "#/components/parameters/Query.LocalityTypes" } ], "responses": { @@ -367,7 +381,7 @@ }, "post": { "description": "This method is used to create a meService resource. This method is typically used in \"service availability update and new service registration\" procedure", - "operationId": "Services_POST", + "operationId": "AppServices_POST", "tags": [ "services" ], @@ -390,15 +404,18 @@ } } }, - "/services/{serviceId}": { + "/applications/{appInstanceId}/services/{serviceId}": { "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + }, { "$ref": "#/components/parameters/Path.ServiceId" } ], "get": { "description": "This method retrieves information about a meService resource. This method is typically used in \"service availability query\" procedure", - "operationId": "ServicesServiceId_GET", + "operationId": "AppServicesServiceId_GET", "tags": [ "services" ], @@ -419,7 +436,7 @@ }, "put": { "description": "This method updates the information about a meService resource", - "operationId": "ServicesServiceId_PUT", + "operationId": "AppServicesServiceId_PUT", "tags": [ "services" ], @@ -445,6 +462,71 @@ } } }, + "/services": { + "get": { + "description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure", + "operationId": "Services_GET", + "parameters": [ + { + "$ref": "#/components/parameters/Query.Ser_instance_id" + }, + { + "$ref": "#/components/parameters/Query.Ser_name" + }, + { + "$ref": "#/components/parameters/Query.Ser_category_id" + }, + { + "$ref": "#/components/parameters/Query.Consumed_local_only" + }, + { + "$ref": "#/components/parameters/Query.Is_local" + }, + { + "$ref": "#/components/parameters/Query.LocalityTypes" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Services.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, + "/services/{serviceId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.ServiceId" + } + ], + "get": { + "description": "This method retrieves information about a meService resource. This method is typically used in \"service availability query\" procedure", + "operationId": "ServicesServiceId_GET", + "responses": { + "200": { + "$ref": "#/components/responses/ServicesServiceId.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, "/timing/current_time": { "get": { "description": "This method retrieves the information of the platform's current time which corresponds to the get platform time procedure", @@ -1089,6 +1171,19 @@ ], "example": "JSON" }, + "LocalityTypes": { + "description": "The scope of locality as expressed by \"consumedLocalOnly\" and \"isLocal\". If absent, defaults to MEC_HOST", + "type": "string", + "enum": [ + "MEC_SYSTEM", + "MEC_HOST", + "NFVI_POP", + "ZONE", + "ZONE_GROUP", + "NFVI_NODE" + ], + "example": "MEC_SYSTEM" + }, "ServiceInfo.SerInstanceId": { "description": "Identifier of the service instance assigned by the MEPM / mobile edge platform.", "type": "string", @@ -1120,6 +1215,16 @@ "type": "string", "example": "ServiceVersion1" }, + "ServiceInfo.ConsumedLocalOnly": { + "description": "Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance.", + "type": "boolean", + "example": false + }, + "ServiceInfo.IsLocal": { + "description": "Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application.", + "type": "boolean", + "example": true + }, "ServiceInfo.Post": { "description": "This type represents the general information of a mobile edge service.", "type": "object", @@ -1165,6 +1270,58 @@ }, "serializer": { "$ref": "#/components/schemas/SerializerTypes" + }, + "scopeOfLocality": { + "$ref": "#/components/schemas/LocalityTypes" + }, + "consumedLocalOnly": { + "$ref": "#/components/schemas/ServiceInfo.ConsumedLocalOnly" + }, + "isLocal": { + "$ref": "#/components/schemas/ServiceInfo.IsLocal" + } + } + }, + "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" + }, + "scopeOfLocality": { + "$ref": "#/components/schemas/LocalityTypes" + }, + "consumedLocalOnly": { + "$ref": "#/components/schemas/ServiceInfo.ConsumedLocalOnly" + }, + "isLocal": { + "$ref": "#/components/schemas/ServiceInfo.IsLocal" } } }, @@ -1819,6 +1976,33 @@ "type": "string" } } + }, + "Query.LocalityTypes": { + "name": "scope_of_locality", + "description": "A MEC application instance may use scope_of_locality as an input parameter to query the availability of a list of MEC service instances with a certain scope of locality.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "Query.Is_local": { + "name": "is_local", + "description": "Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + "Query.Consumed_local_only": { + "name": "consumed_local_only", + "description": "Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } } }, "responses": { @@ -2516,4 +2700,4 @@ } } } -} \ No newline at end of file +} diff --git a/Mp1.yaml b/Mp1.yaml index e31649d4491a36ff4c7659370d8973c1e6ae0dc8..bf46e6bcc7a867b6e0d5cd5de891ec1550ea9451 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -4,7 +4,7 @@ servers: - url: 'https://127.0.0.1:8081/mp1/v1' info: title: Mp1 API - version: 1.1.1 + version: 2.0.5 description: The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI license: name: ETSI Forge copyright notice @@ -12,9 +12,9 @@ info: contact: email: cti_support@etsi.org externalDocs: - description: 'ETSI GS MEC011 Application Enablement API, V1.1.1' + description: 'ETSI GS MEC011 Application Enablement API, V2.0.5' url: >- - http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf + https://docbox.etsi.org/ISG/MEC/70-Draft/0011v211Plat.App.Enabl/MEC-0011v211Plat.App.Enablv205.zip tags: - name: trafficRules - name: dnsRules @@ -222,18 +222,23 @@ paths: $ref: '#/components/responses/Error.412' requestBody: $ref: '#/components/requestBodies/ApplicationsTrafficRule' - '/services': + '/applications/{appInstanceId}/services': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' get: description: >- This method retrieves information about a list of meService resources. This method is typically used in "service availability query" procedure - operationId: Services_GET + operationId: AppServices_GET tags: - services parameters: - $ref: '#/components/parameters/Query.Ser_instance_id' - $ref: '#/components/parameters/Query.Ser_name' - $ref: '#/components/parameters/Query.Ser_category_id' + - $ref: '#/components/parameters/Query.Consumed_local_only' + - $ref: '#/components/parameters/Query.Is_local' + - $ref: '#/components/parameters/Query.LocalityTypes' responses: '200': $ref: '#/components/responses/Services.200' @@ -248,7 +253,7 @@ paths: This method is used to create a meService resource. This method is typically used in "service availability update and new service registration" procedure - operationId: Services_POST + operationId: AppServices_POST tags: - services responses: @@ -262,14 +267,15 @@ paths: $ref: '#/components/responses/Error.404' requestBody: $ref: '#/components/requestBodies/Services.Post' - '/services/{serviceId}': + '/applications/{appInstanceId}/services/{serviceId}': parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' - $ref: '#/components/parameters/Path.ServiceId' get: description: >- This method retrieves information about a meService resource. This method is typically used in "service availability query" procedure - operationId: ServicesServiceId_GET + operationId: AppServicesServiceId_GET tags: - services responses: @@ -283,7 +289,7 @@ paths: $ref: '#/components/responses/Error.404' put: description: This method updates the information about a meService resource - operationId: ServicesServiceId_PUT + operationId: AppServicesServiceId_PUT tags: - services responses: @@ -299,6 +305,47 @@ paths: $ref: '#/components/responses/Error.412' requestBody: $ref: '#/components/requestBodies/ServicesServiceId' + + + '/services': + get: + description: >- + This method retrieves information about a list of meService resources. + This method is typically used in "service availability query" procedure + operationId: Services_GET + parameters: + - $ref: '#/components/parameters/Query.Ser_instance_id' + - $ref: '#/components/parameters/Query.Ser_name' + - $ref: '#/components/parameters/Query.Ser_category_id' + - $ref: '#/components/parameters/Query.Consumed_local_only' + - $ref: '#/components/parameters/Query.Is_local' + - $ref: '#/components/parameters/Query.LocalityTypes' + responses: + '200': + $ref: '#/components/responses/Services.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '/services/{serviceId}': + parameters: + - $ref: '#/components/parameters/Path.ServiceId' + get: + description: >- + This method retrieves information about a meService resource. This + method is typically used in "service availability query" procedure + operationId: ServicesServiceId_GET + responses: + '200': + $ref: '#/components/responses/ServicesServiceId.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' '/timing/current_time': get: description: >- @@ -821,6 +868,17 @@ components: - XML - PROTOBUF3 example: 'JSON' + LocalityTypes: + description: The scope of locality as expressed by "consumedLocalOnly" and "isLocal". If absent, defaults to MEC_HOST + type: string + enum: + - MEC_SYSTEM + - MEC_HOST + - NFVI_POP + - ZONE + - ZONE_GROUP + - NFVI_NODE + example: 'MEC_SYSTEM' ServiceInfo.SerInstanceId: description: >- Identifier of the service instance assigned by the MEPM / mobile edge @@ -855,6 +913,19 @@ components: description: Service version type: string example: 'ServiceVersion1' + ServiceInfo.ConsumedLocalOnly: + description: >- + Indicate whether the service can only be consumed by the MEC applications + located in the same locality (as defined by scopeOfLocality) as this + service instance. + type: boolean + example: false + ServiceInfo.IsLocal: + description: >- + Indicate whether the service is located in the same locality (as defined + by scopeOfLocality) as the consuming MEC application. + type: boolean + example: true ServiceInfo.Post: description: This type represents the general information of a mobile edge service. type: object @@ -883,6 +954,12 @@ components: $ref: '#/components/schemas/TransportInfo' serializer: $ref: '#/components/schemas/SerializerTypes' + scopeOfLocality: + $ref: '#/components/schemas/LocalityTypes' + consumedLocalOnly: + $ref: '#/components/schemas/ServiceInfo.ConsumedLocalOnly' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' ServiceInfo: description: This type represents the general information of a mobile edge service. type: object @@ -907,6 +984,12 @@ components: $ref: '#/components/schemas/TransportInfo' serializer: $ref: '#/components/schemas/SerializerTypes' + scopeOfLocality: + $ref: '#/components/schemas/LocalityTypes' + consumedLocalOnly: + $ref: '#/components/schemas/ServiceInfo.ConsumedLocalOnly' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' Subscription: description: A link to the related subscription type: object @@ -1415,6 +1498,35 @@ components: type: array items: type: string + Query.LocalityTypes: + name: scope_of_locality + description: >- + A MEC application instance may use scope_of_locality as an input + parameter to query the availability of a list of MEC service instances + with a certain scope of locality. + in: query + required: false + schema: + type: string + Query.Is_local: + name: is_local + description: >- + Indicate whether the service is located in the same locality (as + defined by scopeOfLocality) as the consuming MEC application. + in: query + required: false + schema: + type: boolean + Query.Consumed_local_only: + name: consumed_local_only + description: >- + Indicate whether the service can only be consumed by the MEC + applications located in the same locality (as defined by + scopeOfLocality) as this service instance. + in: query + required: false + schema: + type: boolean responses: ApplicationsDnsRules.200: description: >- @@ -1693,11 +1805,13 @@ components: application/json: schema: $ref: '#/components/schemas/AppTerminationNotification' + required: true ServiceAvailabilityNotification: content: application/json: schema: $ref: '#/components/schemas/ServiceAvailabilityNotification' + required: true callbacks: AppTerminationNotification: '{$request.body#/callbackReference}': @@ -1903,4 +2017,4 @@ components: dstInterface: interfaceType: 'IP' dstIpAddress: '20.1.1.1' - state: 'ACTIVE' \ No newline at end of file + state: 'ACTIVE' diff --git a/README.md b/README.md index 3655537cab4b549ee90dc28337cbc30cc191266c..25f27f7442ae0c1588708359ea195e25e1c47618 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E ## Online resources -* [Specification document](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf) -* [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop/Mp1.yaml). -* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop/Mp1.yaml). +* [Specification document](https://docbox.etsi.org/ISG/MEC/70-Draft/0011v211Plat.App.Enabl/MEC-0011v211Plat.App.Enablv205.zip) +* [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/mec11v205-openAPI3/Mp1.yaml). +* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/mec11v205-openAPI3/Mp1.yaml).