From 7ea3988112ee8e45107cb8a131f36e525b9dd3d3 Mon Sep 17 00:00:00 2001 From: featherstone Date: Mon, 28 Jan 2019 21:00:25 +0000 Subject: [PATCH] MEC11 GS2.0.5, OpenAPI3 --- Mp1.json | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++---- Mp1.yaml | 130 ++++++++++++++++++++++++++++++++++++++++---- README.md | 2 +- 3 files changed, 271 insertions(+), 20 deletions(-) diff --git a/Mp1.json b/Mp1.json index c960089..b8537b8 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", @@ -18,8 +18,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" }, "paths": { "/applications/{appInstanceId}/dns_rules": { @@ -276,10 +276,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", "parameters": [ { "$ref": "#/components/parameters/Query.Ser_instance_id" @@ -289,6 +294,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": { @@ -308,7 +322,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", "responses": { "201": { "$ref": "#/components/responses/Services.201" @@ -328,15 +342,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", "responses": { "200": { "$ref": "#/components/responses/ServicesServiceId.200" @@ -354,7 +371,7 @@ }, "put": { "description": "This method updates the information about a meService resource", - "operationId": "ServicesServiceId_PUT", + "operationId": "AppServicesServiceId_PUT", "responses": { "200": { "$ref": "#/components/responses/ServicesServiceId.200" @@ -377,6 +394,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", @@ -1000,6 +1082,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", @@ -1030,6 +1125,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": { "description": "This type represents the general information of a mobile edge service.", "type": "object", @@ -1063,6 +1168,15 @@ }, "serializer": { "$ref": "#/components/schemas/SerializerTypes" + }, + "scopeOfLocality": { + "$ref": "#/components/schemas/LocalityTypes" + }, + "consumedLocalOnly": { + "$ref": "#/components/schemas/ServiceInfo.ConsumedLocalOnly" + }, + "isLocal": { + "$ref": "#/components/schemas/ServiceInfo.IsLocal" } } }, @@ -1671,6 +1785,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": { diff --git a/Mp1.yaml b/Mp1.yaml index 0990f87..baf06ea 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -4,15 +4,15 @@ 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 url: 'https://forge.etsi.org/etsi-forge-copyright-notice.txt' 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 paths: '/applications/{appInstanceId}/dns_rules': parameters: @@ -192,16 +192,21 @@ 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 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' @@ -216,7 +221,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 responses: '201': $ref: '#/components/responses/Services.201' @@ -228,14 +233,15 @@ paths: $ref: '#/components/responses/Error.404' requestBody: $ref: '#/components/requestBodies/Services' - '/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 responses: '200': $ref: '#/components/responses/ServicesServiceId.200' @@ -247,7 +253,7 @@ paths: $ref: '#/components/responses/Error.404' put: description: This method updates the information about a meService resource - operationId: ServicesServiceId_PUT + operationId: AppServicesServiceId_PUT responses: '200': $ref: '#/components/responses/ServicesServiceId.200' @@ -261,6 +267,51 @@ 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: >- @@ -768,7 +819,18 @@ components: - JSON - XML - PROTOBUF3 - example: JSON + 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 @@ -802,6 +864,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: description: This type represents the general information of a mobile edge service. type: object @@ -827,6 +902,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 @@ -1330,6 +1411,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: >- diff --git a/README.md b/README.md index 3655537..3f36872 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 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) +* [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/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). -- GitLab