From ece65d7ce0e6da4de41b7fbc0099f593d27b9b20 Mon Sep 17 00:00:00 2001 From: featherstone Date: Sat, 11 May 2019 00:02:40 +0100 Subject: [PATCH 1/6] Coversion to OpenAPI3 --- BwManagementApi.json | 862 +++++++++++++++++++++--------------------- BwManagementApi.yaml | 863 ++++++++++++++++++++++--------------------- README.md | 6 +- 3 files changed, 868 insertions(+), 863 deletions(-) diff --git a/BwManagementApi.json b/BwManagementApi.json index 863ca94..eb120a2 100644 --- a/BwManagementApi.json +++ b/BwManagementApi.json @@ -1,484 +1,473 @@ { - "swagger": "2.0", - "info": { - "description": "The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI", - "version": "1.1.1", - "title": "BWM API", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - } + "openapi": "3.0.2", + "info": { + "description": "The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI", + "version": "1.1.1", + "title": "BWM API", + "license": { + "name": "ETSI Forge copyright notice", + "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" }, - "externalDocs": { - "description": "ETSI MEC015 V1.1.1 Bandwidth Management API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf" + "contact": { + "email": "cti_support@etsi.org" + } + }, + "externalDocs": { + "description": "ETSI MEC015 V1.1.1 Bandwidth Management API", + "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf" + }, + "servers": [ + { + "url": "http://127.0.0.1:8081/bwm/v1" }, - "host": "127.0.0.1:8081", - "basePath": "/bwm/v1", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "securityDefinitions": { - "OauthSecurity": { - "type": "oauth2", - "flow": "application", - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" + { + "url": "https://127.0.0.1:8081/bwm/v1" + } + ], + "security": [ + { + "OauthSecurity": [ + "all" + ] + } + ], + "tags": [ + { + "name": "BandwithAllocation" + }, + { + "name": "BandwithAllocations" + } + ], + "paths": { + "/bw_allocations": { + "get": { + "description": "This method retrieves information about a list of bandwidthAllocation resources. In queries, either \"app_instance_id\" or \"app_name\" or \"session_Id\" or none of them shall be present.", + "parameters": [ + { + "$ref": "#/components/parameters/Query.AppInstanceId" + }, + { + "$ref": "#/components/parameters/Query.AppName" + }, + { + "$ref": "#/components/parameters/Query.SessionId" + } + ], + "operationId": "BandwithAllocations_GET", + "tags": [ + "BandwithAllocations" + ], + "responses": { + "200": { + "$ref": "#/components/responses/BandwithAllocations" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + }, + "post": { + "description": "This method is used to create a bandwidthAllocation resource.", + "requestBody": { + "$ref": "#/components/requestBodies/BwInfo" + }, + "operationId": "BandwithAllocations_POST", + "tags": [ + "BandwithAllocations" + ], + "responses": { + "201": { + "$ref": "#/components/responses/BandwithAllocation.201" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } } } }, - "parameters": { - "Body.BwInfo": { - "name": "bwInfo", - "in": "body", - "description": "BwInfo with updated information is included as entity body of the request", - "required": true, - "schema": { - "$ref": "#/definitions/BwInfo" + "/bw_allocations/{allocationId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AllocationId" + } + ], + "get": { + "description": "This method retrieves information about a specific bandwidthAllocation resource.", + "operationId": "BandwithAllocation_GET", + "tags": [ + "BandwithAllocation" + ], + "responses": { + "200": { + "$ref": "#/components/responses/BandwithAllocation" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } } }, - "Body.BwInfoDeltas": { - "name": "bwInfoDeltas", - "in": "body", - "description": "Description of the changes to instruct the server how to modify the resource representation. ", - "required": true, - "schema": { - "$ref": "#/definitions/BwInfoDeltas" + "put": { + "description": "This method updates the information about a specific bandwidthAllocation resource.", + "requestBody": { + "$ref": "#/components/requestBodies/BwInfo" + }, + "operationId": "BandwithAllocation_PUT", + "tags": [ + "BandwithAllocation" + ], + "responses": { + "200": { + "$ref": "#/components/responses/BandwithAllocation" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + }, + "412": { + "$ref": "#/components/responses/Error.412" + } + } + }, + "patch": { + "description": "This method updates the information about a specific bandwidthAllocation resource.", + "requestBody": { + "$ref": "#/components/requestBodies/BwInfoDeltas" + }, + "operationId": "BandwithAllocation_PAT", + "tags": [ + "BandwithAllocation" + ], + "responses": { + "200": { + "$ref": "#/components/responses/BandwithAllocation" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + }, + "412": { + "$ref": "#/components/responses/Error.412" + } } }, + "delete": { + "description": "Remove a specific bandwidthAllocation resource. DELETE method is typically used in \"Unregister from Bandwidth Management Service\" procedure", + "operationId": "BandwithAllocation_DEL", + "tags": [ + "BandwithAllocation" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + } + }, + "components": { + "parameters": { "Path.AllocationId": { "name": "allocationId", "in": "path", "description": "Represents a bandwidth allocation instance", "required": true, - "type": "string" + "schema": { + "type": "string" + } }, "Query.AppInstanceId": { "name": "app_instance_id", "in": "query", - "description": "A mobile edge application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of mobile edge application instances. ", + "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of mobile edge application instances.", "required": false, - "type": "array", - "items": { - "type": "string" + "schema": { + "type": "array", + "items": { + "type": "string" + } } }, "Query.AppName": { "name": "app_name", "in": "query", - "description": "A mobile edge application instance may use multiple ser_names as an input parameter to query the bandwidth allocation of a list of mobile edge application instances. ", + "description": "A MEC application instance may use multiple ser_names as an input parameter to query the bandwidth allocation of a list of mobile edge application instances.", "required": false, - "type": "array", - "items": { - "type": "string" + "schema": { + "type": "array", + "items": { + "type": "string" + } } }, "Query.SessionId": { "name": "session_id", "in": "query", - "description": "A mobile edge application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. ", + "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions.", "required": false, - "type": "array", - "items": { - "type": "string" + "schema": { + "type": "array", + "items": { + "type": "string" + } } } }, - "paths": { - "/bw_allocations": { - "get": { - "description": "This method retrieves information about a list of bandwidthAllocation resources", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInstanceId" - }, - { - "$ref": "#/parameters/Query.AppName" - }, - { - "$ref": "#/parameters/Query.SessionId" + "requestBodies": { + "BwInfo": { + "description": "Bandwidth Allocation information", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BwInfo" } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the bandwidthAllocations is returned.", - "schema": { - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/definitions/BwInfo" - } - } - } - }, - "400": { - "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + } + } + }, + "BwInfoDeltas": { + "description": "Description of the changes to instruct the server how to modify the Bandwidth Allocation information.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BwInfoDeltas" + } + } + } + } + }, + "links": { + "GetBandwithAllocation": { + "operationId": "BandwithAllocation_GET", + "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'GET .../bw_allocations/{allocationId}''", + "parameters": { + "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", + "allocationId": "TBC" + } + }, + "PatBandwithAllocation": { + "operationId": "BandwithAllocation_PAT", + "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PATCH .../bw_allocations/{allocationId}''", + "parameters": { + "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", + "allocationId": "TBC" + } + }, + "PutBandwithAllocation": { + "operationId": "BandwithAllocation_PUT", + "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PUT .../bw_allocations/{allocationId}''", + "parameters": { + "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", + "allocationId": "TBC" + } + }, + "DelBandwithAllocation": { + "operationId": "BandwithAllocation_DEL", + "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'DELETE .../bw_allocations/{allocationId}''", + "parameters": { + "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", + "allocationId": "TBC" + } + } + }, + "responses": { + "BandwithAllocation": { + "description": "Bandwidth Allocation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + }, + "BandwithAllocation.201": { + "description": "Bandwidth Allocation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BwInfo" } } }, - "post": { - "description": "This method is used to create a bandwidthAllocation resource.", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.BwInfo" + "headers": { + "location": { + "description": "The resource URI of the created resource", + "schema": { + "type": "string", + "format": "uri" } - ], - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a \"Location\" HTTP header that contains the resource URI of the created resource.", - "schema": { - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/definitions/BwInfo" - } - } - } - }, - "400": { - "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } + } + } + }, + "BandwithAllocations": { + "description": "Bandwidth Allocations.", + "content": { + "application/json": { + "schema": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/BwInfo" } } } + }, + "links": { + "getBandwithAllocation": { + "$ref": "#/components/links/GetBandwithAllocation" + }, + "patBandwithAllocation": { + "$ref": "#/components/links/PatBandwithAllocation" + }, + "putBandwithAllocation": { + "$ref": "#/components/links/PutBandwithAllocation" + }, + "delBandwithAllocation": { + "$ref": "#/components/links/DelBandwithAllocation" + } } }, - "/bw_allocations/{allocationId}": { - "get": { - "description": "This method retrieves information about a specific bandwidthAllocation resource. ", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.AllocationId" + "Error.400": { + "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" } - ], - "responses": { - "200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "schema": { - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/definitions/BwInfo" - } - } - } - }, - "400": { - "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure. required:\n - ProblemDetails\nproperties:\n ProblemDetails:\n $ref: '#/definitions/ProblemDetails'" - }, - "404": { - "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" } } - }, - "put": { - "description": "This method updates the information about a specific bandwidthAllocation resource. ", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.AllocationId" - }, - { - "$ref": "#/parameters/Body.BwInfo" + } + }, + "Error.401": { + "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing data type describing the updated BwInfo is returned.", - "schema": { - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/definitions/BwInfo" - } - } - } - }, - "400": { - "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" } } - }, - "patch": { - "description": "This method updates the information about a specific bandwidthAllocation resource. ", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.AllocationId" - }, - { - "$ref": "#/parameters/Body.BwInfoDeltas" + } + }, + "Error.403": { + "description": "Forbidden. The operation is not allowed given the current status of the resource. ", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing data type describing the updated BwInfo is returned.", - "schema": { - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/definitions/BwInfo" - } - } - } - }, - "400": { - "description": "It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + } + } + }, + "Error.404": { + "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" } } - }, - "delete": { - "description": "Remove a specific bandwidthAllocation resource. DELETE method is typically used in \"Unregister from Bandwidth Management Service\" procedure", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.AllocationId" + } + }, + "Error.412": { + "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" } - ], - "responses": { - "204": { - "description": "No Content" - }, - "403": { - "description": "The operation is not allowed given the current status of the resource. More information shall be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "schema": { - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "schema": { - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" } } } } }, - "definitions": { + "securitySchemes": { + "OauthSecurity": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://oauth.exampleAPI/token", + "scopes": { + "all": "Single oauth2 scope for API" + } + } + } + } + }, + "schemas": { + "Empty": { + "description": "Empty schema" + }, "ProblemDetails": { "type": "object", "properties": { "type": { - "$ref": "#/definitions/Problem.type" + "$ref": "#/components/schemas/Problem.type" }, "title": { - "$ref": "#/definitions/Problem.title" + "$ref": "#/components/schemas/Problem.title" }, "status": { - "$ref": "#/definitions/Problem.status" + "$ref": "#/components/schemas/Problem.status" }, "detail": { - "$ref": "#/definitions/Problem.detail" + "$ref": "#/components/schemas/Problem.detail" }, "instance": { - "$ref": "#/definitions/Problem.instance" + "$ref": "#/components/schemas/Problem.instance" } } }, @@ -516,49 +505,49 @@ ], "properties": { "timeStamp": { - "$ref": "#/definitions/TimeStamp" + "$ref": "#/components/schemas/TimeStamp" }, "appInsId": { - "$ref": "#/definitions/AppInsId" + "$ref": "#/components/schemas/AppInsId" }, "requestType": { - "$ref": "#/definitions/RequestType" + "$ref": "#/components/schemas/RequestType" }, "sessionFilter": { - "$ref": "#/definitions/SessionFilter" + "$ref": "#/components/schemas/SessionFilter" }, "fixedBWPriority": { - "$ref": "#/definitions/FixedBWPriority" + "$ref": "#/components/schemas/FixedBWPriority" }, "fixedAllocation": { - "$ref": "#/definitions/FixedAllocation" + "$ref": "#/components/schemas/FixedAllocation" }, "allocationDirection": { - "$ref": "#/definitions/AllocationDirection" + "$ref": "#/components/schemas/AllocationDirection" } } }, "BwInfoDeltas": { - "description": "Conform to JSON merge patch format and processing rules specified IETF RFC 7396 [8], this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON", + "description": "Conform to JSON merge patch format and processing rules specified IETF RFC 7396, this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON", "type": "object", "properties": { "appInsId": { - "$ref": "#/definitions/AppInsId" + "$ref": "#/components/schemas/AppInsId" }, "requestType": { - "$ref": "#/definitions/RequestType" + "$ref": "#/components/schemas/RequestType" }, "sessionFilter": { - "$ref": "#/definitions/SessionFilter" + "$ref": "#/components/schemas/SessionFilter" }, "fixedBWPriority": { - "$ref": "#/definitions/FixedBWPriority" + "$ref": "#/components/schemas/FixedBWPriority" }, "fixedAllocation": { - "$ref": "#/definitions/FixedAllocation" + "$ref": "#/components/schemas/FixedAllocation" }, "allocationDirection": { - "$ref": "#/definitions/AllocationDirection" + "$ref": "#/components/schemas/AllocationDirection" } } }, @@ -570,10 +559,10 @@ ], "properties": { "seconds": { - "$ref": "#/definitions/Seconds" + "$ref": "#/components/schemas/Seconds" }, "nanoSeconds": { - "$ref": "#/definitions/NanoSeconds" + "$ref": "#/components/schemas/NanoSeconds" } } }, @@ -587,7 +576,8 @@ "enum": [ "APPLICATION_SPECIFIC_BW_ALLOCATION", "SESSION_SPECIFIC_BW_ALLOCATION" - ] + ], + "example": "APPLICATION_SPECIFIC_BW_ALLOCATION" }, "SessionFilter": { "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", @@ -596,19 +586,19 @@ "type": "object", "properties": { "sourceIp": { - "$ref": "#/definitions/SourceIp" + "$ref": "#/components/schemas/SourceIp" }, "sourcePort": { - "$ref": "#/definitions/SourcePort" + "$ref": "#/components/schemas/SourcePort" }, "dstAddress": { - "$ref": "#/definitions/DstAddress" + "$ref": "#/components/schemas/DstAddress" }, "dstPort": { - "$ref": "#/definitions/DstPort" + "$ref": "#/components/schemas/DstPort" }, "protocol": { - "$ref": "#/definitions/Protocol" + "$ref": "#/components/schemas/Protocol" } } } @@ -631,7 +621,8 @@ "00 = Downlink (towards the UE)", "01 = Uplink (towards the application/session)", "10 = Symmetrical" - ] + ], + "example": "00" }, "Seconds": { "description": "The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", @@ -648,7 +639,7 @@ "type": "string" }, "SourcePort": { - "description": "Source port identity of session ", + "description": "Source port identity of session", "type": "array", "items": { "type": "string" @@ -659,7 +650,7 @@ "type": "string" }, "DstPort": { - "description": "Destination port identity of session ", + "description": "Destination port identity of session", "type": "array", "items": { "type": "string" @@ -670,4 +661,5 @@ "type": "string" } } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/BwManagementApi.yaml b/BwManagementApi.yaml index 58564da..11d464f 100644 --- a/BwManagementApi.yaml +++ b/BwManagementApi.yaml @@ -1,485 +1,498 @@ -swagger: '2.0' +openapi: 3.0.2 info: - description: >- - The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI + description: The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI version: 1.1.1 title: BWM API license: name: ETSI Forge copyright notice - url: 'https://forge.etsi.org/etsi-forge-copyright-notice.txt' + url: https://forge.etsi.org/etsi-forge-copyright-notice.txt + contact: + email: cti_support@etsi.org externalDocs: description: ETSI MEC015 V1.1.1 Bandwidth Management API - url: 'http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf' -host: '127.0.0.1:8081' -basePath: /bwm/v1 -schemes: - - http - - https -consumes: - - application/json -produces: - - application/json + url: http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf +servers: + - url: http://127.0.0.1:8081/bwm/v1 + - url: https://127.0.0.1:8081/bwm/v1 security: - OauthSecurity: - all -securityDefinitions: - OauthSecurity: - type: oauth2 - flow: application - tokenUrl: 'https://oauth.exampleAPI/token' - scopes: - all: Single oauth2 scope for API -parameters: - Body.BwInfo: - name: bwInfo - in: body - description: >- - BwInfo with updated information is included as entity body of the request - required: true - schema: - $ref: '#/definitions/BwInfo' - Body.BwInfoDeltas: - name: bwInfoDeltas - in: body - description: >- - Description of the changes to instruct the server how to modify the resource representation. - required: true - schema: - $ref: '#/definitions/BwInfoDeltas' - Path.AllocationId: - name: allocationId - in: path - description: >- - Represents a bandwidth allocation instance - required: true - type: string - Query.AppInstanceId: - name: app_instance_id - in: query - description: >- - A mobile edge application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of mobile edge application instances. - required: false - type: array - items: - type: string - Query.AppName: - name: app_name - in: query - description: >- - A mobile edge application instance may use multiple ser_names as an input parameter to query the bandwidth allocation of a list of mobile edge application instances. - required: false - type: array - items: - type: string - Query.SessionId: - name: session_id - in: query - description: >- - A mobile edge application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. - required: false - type: array - items: - type: string +tags: + - name: BandwithAllocation + - name: BandwithAllocations paths: - /bw_allocations: + '/bw_allocations': get: description: >- - This method retrieves information about a list of bandwidthAllocation resources - produces: - - application/json + This method retrieves information about a list of bandwidthAllocation + resources. In queries, either "app_instance_id" or "app_name" or "session_Id" + or none of them shall be present. parameters: - - $ref: '#/parameters/Query.AppInstanceId' - - $ref: '#/parameters/Query.AppName' - - $ref: '#/parameters/Query.SessionId' + - $ref: "#/components/parameters/Query.AppInstanceId" + - $ref: "#/components/parameters/Query.AppName" + - $ref: "#/components/parameters/Query.SessionId" + operationId: BandwithAllocations_GET + tags: + - BandwithAllocations responses: '200': - description: >- - Upon success, a response body containing an array of the bandwidthAllocations is returned. - schema: - required: - - bwInfo - properties: - bwInfo: - $ref: '#/definitions/BwInfo' + $ref: '#/components/responses/BandwithAllocations' '400': - description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.400' '403': - description: >- - The operation is not allowed given the current status of the resource. More information should be provided in the "detail" attribute of the "ProblemDetails" structure. - schema: - required: - - ProblemDetails - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.403' '404': - description: >- - It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.404' post: description: >- This method is used to create a bandwidthAllocation resource. - produces: - - application/json - parameters: - - $ref: '#/parameters/Body.BwInfo' + requestBody: + $ref: "#/components/requestBodies/BwInfo" + operationId: BandwithAllocations_POST + tags: + - BandwithAllocations responses: '201': - description: >- - Upon success, the HTTP response shall include a "Location" HTTP header that contains the resource URI of the created resource. - schema: - required: - - bwInfo - properties: - bwInfo: - $ref: '#/definitions/BwInfo' + $ref: '#/components/responses/BandwithAllocation.201' '400': - description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.400' '403': - description: >- - The operation is not allowed given the current status of the resource. More information should be provided in the "detail" attribute of the "ProblemDetails" structure. - schema: - required: - - ProblemDetails - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.403' '404': - description: >- - It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' - /bw_allocations/{allocationId}: + $ref: '#/components/responses/Error.404' + '/bw_allocations/{allocationId}': + parameters: + - $ref: "#/components/parameters/Path.AllocationId" get: - description: >- - This method retrieves information about a specific bandwidthAllocation resource. - produces: - - application/json - parameters: - - $ref: '#/parameters/Path.AllocationId' + description: >- + This method retrieves information about a specific bandwidthAllocation + resource. + operationId: BandwithAllocation_GET + tags: + - BandwithAllocation responses: '200': - description: >- - It is used to indicate nonspecific success. The response body contains a representation of the resource. - schema: - required: - - bwInfo - properties: - bwInfo: - $ref: '#/definitions/BwInfo' + $ref: '#/components/responses/BandwithAllocation' '400': - description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.400' '403': - description: >- - The operation is not allowed given the current status of the resource. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. - required: - - ProblemDetails - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.403' '404': - description: >- - It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.404' put: description: >- - This method updates the information about a specific bandwidthAllocation resource. - produces: - - application/json - parameters: - - $ref: '#/parameters/Path.AllocationId' - - $ref: '#/parameters/Body.BwInfo' + This method updates the information about a specific + bandwidthAllocation resource. + requestBody: + $ref: "#/components/requestBodies/BwInfo" + operationId: BandwithAllocation_PUT + tags: + - BandwithAllocation responses: '200': - description: >- - Upon success, a response body containing data type describing the updated BwInfo is returned. - schema: - required: - - bwInfo - properties: - bwInfo: - $ref: '#/definitions/BwInfo' + $ref: '#/components/responses/BandwithAllocation' '400': - description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.400' '403': - description: >- - The operation is not allowed given the current status of the resource. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. - schema: - required: - - ProblemDetails - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.403' '404': - description: >- - It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.404' '412': - description: >- - It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.412' patch: description: >- - This method updates the information about a specific bandwidthAllocation resource. - produces: - - application/json - parameters: - - $ref: '#/parameters/Path.AllocationId' - - $ref: '#/parameters/Body.BwInfoDeltas' + This method updates the information about a specific + bandwidthAllocation resource. + requestBody: + $ref: '#/components/requestBodies/BwInfoDeltas' + operationId: BandwithAllocation_PAT + tags: + - BandwithAllocation responses: '200': - description: >- - Upon success, a response body containing data type describing the updated BwInfo is returned. - schema: - required: - - bwInfo - properties: - bwInfo: - $ref: '#/definitions/BwInfo' + $ref: '#/components/responses/BandwithAllocation' '400': - description: It is used to indicate that incorrect parameters were passed to the request. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.400' '403': - description: >- - The operation is not allowed given the current status of the resource. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. - schema: - required: - - ProblemDetails - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.403' '404': - description: >- - It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.404' '412': - description: >- - It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. - schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.412' delete: - description: Remove a specific bandwidthAllocation resource. DELETE method is typically used in "Unregister from Bandwidth Management Service" procedure - produces: - - application/json - parameters: - - $ref: '#/parameters/Path.AllocationId' + description: >- + Remove a specific bandwidthAllocation resource. DELETE method is + typically used in "Unregister from Bandwidth Management Service" + procedure + operationId: BandwithAllocation_DEL + tags: + - BandwithAllocation responses: '204': description: No Content '403': - description: >- - The operation is not allowed given the current status of the resource. More information shall be provided in the "detail" attribute of the "ProblemDetails" structure. - schema: - required: - - ProblemDetails - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' + $ref: '#/components/responses/Error.403' '404': - description: >- - It is used when a client provided a URI that cannot be mapped to a valid resource URI. In the returned ProblemDetails structure, the "detail" attribute should convey more information about the error. + $ref: '#/components/responses/Error.404' +components: + parameters: + Path.AllocationId: + name: allocationId + in: path + description: >- + Represents a bandwidth allocation instance + required: true + schema: + type: string + Query.AppInstanceId: + name: app_instance_id + in: query + description: >- + A MEC application instance may use multiple app_instance_ids as + an input parameter to query the bandwidth allocation of a list of mobile + edge application instances. + required: false + schema: + type: array + items: + type: string + Query.AppName: + name: app_name + in: query + description: >- + A MEC application instance may use multiple ser_names as an + input parameter to query the bandwidth allocation of a list of mobile + edge application instances. + required: false + schema: + type: array + items: + type: string + Query.SessionId: + name: session_id + in: query + description: >- + A MEC application instance may use session_id as an input + parameter to query the bandwidth allocation of a list of sessions. + required: false + schema: + type: array + items: + type: string + requestBodies: + BwInfo: + description: >- + Bandwidth Allocation information + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/BwInfo" + BwInfoDeltas: + description: >- + Description of the changes to instruct the server how to modify the + Bandwidth Allocation information. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/BwInfoDeltas" + links: + GetBandwithAllocation: + operationId: BandwithAllocation_GET + description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'GET .../bw_allocations/{allocationId}'' + parameters: + description: >- + regex = \/bwm\/v1\/bw_allocations\/(.*); + allocationId = location.match(regex)[1]; + where "location" is the location header uri returned from operationId BandwithAllocations_POST + allocationId: 'TBC' + PatBandwithAllocation: + operationId: BandwithAllocation_PAT + description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PATCH .../bw_allocations/{allocationId}'' + parameters: + description: >- + regex = \/bwm\/v1\/bw_allocations\/(.*); + allocationId = location.match(regex)[1]; + where "location" is the location header uri returned from operationId BandwithAllocations_POST + allocationId: 'TBC' + PutBandwithAllocation: + operationId: BandwithAllocation_PUT + description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PUT .../bw_allocations/{allocationId}'' + parameters: + description: >- + regex = \/bwm\/v1\/bw_allocations\/(.*); + allocationId = location.match(regex)[1]; + where "location" is the location header uri returned from operationId BandwithAllocations_POST + allocationId: 'TBC' + DelBandwithAllocation: + operationId: BandwithAllocation_DEL + description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'DELETE .../bw_allocations/{allocationId}'' + parameters: + description: >- + regex = \/bwm\/v1\/bw_allocations\/(.*); + allocationId = location.match(regex)[1]; + where "location" is the location header uri returned from operationId BandwithAllocations_POST + allocationId: 'TBC' + responses: + BandwithAllocation: + description: Bandwidth Allocation. + content: + application/json: + schema: + $ref: "#/components/schemas/BwInfo" + BandwithAllocation.201: + description: Bandwidth Allocation. + content: + application/json: + schema: + $ref: "#/components/schemas/BwInfo" + headers: + location: + description: The resource URI of the created resource + schema: + type: string + format: uri + BandwithAllocations: + description: Bandwidth Allocations. + content: + application/json: + schema: + type: array + minItems: 0 + items: + $ref: "#/components/schemas/BwInfo" + links: + getBandwithAllocation: + $ref: "#/components/links/GetBandwithAllocation" + patBandwithAllocation: + $ref: "#/components/links/PatBandwithAllocation" + putBandwithAllocation: + $ref: "#/components/links/PutBandwithAllocation" + delBandwithAllocation: + $ref: "#/components/links/DelBandwithAllocation" + Error.400: + description: >- + Bad Request. + It is used to indicate that incorrect parameters were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.401: + description: >- + Unauthorized. + It is used when the client did not submit the appropriate credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.403: + description: >- + Forbidden. + The operation is not allowed given the current status of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + Error.404: + description: >- + Not Found. + It is used when a client provided a URI that cannot be mapped + to a valid resource URI. + content: + application/problem+json: schema: - properties: - ProblemDetails: - $ref: '#/definitions/ProblemDetails' -definitions: - ProblemDetails: - type: object - properties: - type: - $ref: '#/definitions/Problem.type' - title: - $ref: '#/definitions/Problem.title' - status: - $ref: '#/definitions/Problem.status' - detail: - $ref: '#/definitions/Problem.detail' - instance: - $ref: '#/definitions/Problem.instance' - Problem.type: - type: string - format: uri - description: >- - A URI reference according to IETF RFC 3986 that identifies the problem - type - Problem.title: - type: string - description: 'A short, human-readable summary of the problem type' - Problem.status: - type: integer - format: uint32 - description: The HTTP status code for this occurrence of the problem - Problem.detail: - type: string - description: A human-readable explanation specific to this occurrence of the problem - Problem.instance: - type: string - format: uri - description: A URI reference that identifies the specific occurrence of the problem - BwInfo: - description: information of bandwidth resource - type: object - required: - - appInsId - - requestType - - fixedAllocation - - allocationDirection - properties: - timeStamp: - $ref: '#/definitions/TimeStamp' - appInsId: - $ref: '#/definitions/AppInsId' - requestType: - $ref: '#/definitions/RequestType' - sessionFilter: - $ref: '#/definitions/SessionFilter' - fixedBWPriority: - $ref: '#/definitions/FixedBWPriority' - fixedAllocation: - $ref: '#/definitions/FixedAllocation' - allocationDirection: - $ref: '#/definitions/AllocationDirection' - BwInfoDeltas: - description: Conform to JSON merge patch format and processing rules specified IETF RFC 7396 [8], this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON - type: object - properties: - appInsId: - $ref: '#/definitions/AppInsId' - requestType: - $ref: '#/definitions/RequestType' - sessionFilter: - $ref: '#/definitions/SessionFilter' - fixedBWPriority: - $ref: '#/definitions/FixedBWPriority' - fixedAllocation: - $ref: '#/definitions/FixedAllocation' - allocationDirection: - $ref: '#/definitions/AllocationDirection' - TimeStamp: - type: object - required: - - seconds - - nanoSeconds - properties: - seconds: - $ref: '#/definitions/Seconds' - nanoSeconds: - $ref: '#/definitions/NanoSeconds' - AppInsId: - description: >- - Application instance identifier - type: string - RequestType: - description: >- - Numeric value (0 - 255) corresponding to specific type of consumer - type: string - enum: - - APPLICATION_SPECIFIC_BW_ALLOCATION - - SESSION_SPECIFIC_BW_ALLOCATION - SessionFilter: - description: >- - Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected - type: array - items: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.412: + description: >- + Precondition Failed. + It is used when a condition has failed during conditional requests, + e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + securitySchemes: + OauthSecurity: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://oauth.exampleAPI/token + scopes: + all: Single oauth2 scope for API + schemas: + Empty: + description: Empty schema + ProblemDetails: + type: object + properties: + type: + $ref: "#/components/schemas/Problem.type" + title: + $ref: "#/components/schemas/Problem.title" + status: + $ref: "#/components/schemas/Problem.status" + detail: + $ref: "#/components/schemas/Problem.detail" + instance: + $ref: "#/components/schemas/Problem.instance" + Problem.type: + type: string + format: uri + description: A URI reference according to IETF RFC 3986 that identifies the problem + type + Problem.title: + type: string + description: A short, human-readable summary of the problem type + Problem.status: + type: integer + format: uint32 + description: The HTTP status code for this occurrence of the problem + Problem.detail: + type: string + description: A human-readable explanation specific to this occurrence of the problem + Problem.instance: + type: string + format: uri + description: A URI reference that identifies the specific occurrence of the problem + BwInfo: + description: information of bandwidth resource type: object + required: + - appInsId + - requestType + - fixedAllocation + - allocationDirection properties: - sourceIp: - $ref: '#/definitions/SourceIp' - sourcePort: - $ref: '#/definitions/SourcePort' - dstAddress: - $ref: '#/definitions/DstAddress' - dstPort: - $ref: '#/definitions/DstPort' - protocol: - $ref: '#/definitions/Protocol' - FixedBWPriority: - description: >- - Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document - type: string - enum: - - not defined in the present document - FixedAllocation: - description: >- - Size of requested fixed BW allocation in [bps] - type: string - AllocationDirection: - description: >- - The direction of the requested BW allocation - type: string - enum: - - 00 = Downlink (towards the UE) - - 01 = Uplink (towards the application/session) - - 10 = Symmetrical - Seconds: - description: >- - The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - type: integer - format: uint32 - NanoSeconds: - description: >- - The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - type: integer - format: uint32 - SourceIp: - description: >- - Source address identity of session (including range) - type: string - SourcePort: - description: >- - Source port identity of session - type: array - items: + timeStamp: + $ref: "#/components/schemas/TimeStamp" + appInsId: + $ref: "#/components/schemas/AppInsId" + requestType: + $ref: "#/components/schemas/RequestType" + sessionFilter: + $ref: "#/components/schemas/SessionFilter" + fixedBWPriority: + $ref: "#/components/schemas/FixedBWPriority" + fixedAllocation: + $ref: "#/components/schemas/FixedAllocation" + allocationDirection: + $ref: "#/components/schemas/AllocationDirection" + BwInfoDeltas: + description: Conform to JSON merge patch format and processing rules specified IETF + RFC 7396, this type represents the attributes whose value are + allowed to be updated with HTTP PATCH method in content format JSON + type: object + properties: + appInsId: + $ref: "#/components/schemas/AppInsId" + requestType: + $ref: "#/components/schemas/RequestType" + sessionFilter: + $ref: "#/components/schemas/SessionFilter" + fixedBWPriority: + $ref: "#/components/schemas/FixedBWPriority" + fixedAllocation: + $ref: "#/components/schemas/FixedAllocation" + allocationDirection: + $ref: "#/components/schemas/AllocationDirection" + TimeStamp: + type: object + required: + - seconds + - nanoSeconds + properties: + seconds: + $ref: "#/components/schemas/Seconds" + nanoSeconds: + $ref: "#/components/schemas/NanoSeconds" + AppInsId: + description: Application instance identifier + type: string + RequestType: + description: Numeric value (0 - 255) corresponding to specific type of consumer + type: string + enum: + - APPLICATION_SPECIFIC_BW_ALLOCATION + - SESSION_SPECIFIC_BW_ALLOCATION + example: + APPLICATION_SPECIFIC_BW_ALLOCATION + SessionFilter: + description: Session filtering criteria, applicable when requestType is set as + SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a + single session only. In case multiple sessions match sessionFilter the + request shall be rejected + type: array + items: + type: object + properties: + sourceIp: + $ref: "#/components/schemas/SourceIp" + sourcePort: + $ref: "#/components/schemas/SourcePort" + dstAddress: + $ref: "#/components/schemas/DstAddress" + dstPort: + $ref: "#/components/schemas/DstPort" + protocol: + $ref: "#/components/schemas/Protocol" + FixedBWPriority: + description: Indicates the allocation priority when dealing with several applications + or sessions in parallel. Values are not defined in the present document + type: string + enum: + - not defined in the present document + FixedAllocation: + description: Size of requested fixed BW allocation in [bps] + type: string + AllocationDirection: + description: The direction of the requested BW allocation + type: string + enum: + - 00 = Downlink (towards the UE) + - 01 = Uplink (towards the application/session) + - 10 = Symmetrical + example: + "00" + Seconds: + description: The seconds part of the Time. Time is defined as Unix-time since January + 1, 1970, 00:00:00 UTC + type: integer + format: uint32 + NanoSeconds: + description: The nanoseconds part of the Time. Time is defined as Unix-time since + January 1, 1970, 00:00:00 UTC + type: integer + format: uint32 + SourceIp: + description: Source address identity of session (including range) type: string - DstAddress: - description: >- - Destination address identity of session (including range) - type: string - DstPort: - description: >- - Destination port identity of session - type: array - items: + SourcePort: + description: Source port identity of session + type: array + items: + type: string + DstAddress: + description: Destination address identity of session (including range) type: string - Protocol: - description: >- - Protocol number - type: string \ No newline at end of file + DstPort: + description: Destination port identity of session + type: array + items: + type: string + Protocol: + description: Protocol number + type: string \ No newline at end of file diff --git a/README.md b/README.md index 9c0fe40..b15487c 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E ## Online resources -* [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml). -* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml). +* [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/develop/BwManagementApi.yaml). +* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/develop/BwManagementApi.yaml). ## ETSI Forge Copyright statement -Copyright (c) ETSI 2018. +Copyright (c) ETSI 2019. This software is subject to copyrights owned by ETSI. Non-exclusive permission is hereby granted, free of charge, to copy, reproduce and amend this file -- GitLab From 4d94451a32c67aac7c9b5d86b117b6c84ccc8aa3 Mon Sep 17 00:00:00 2001 From: ETSI CTI Date: Tue, 17 Sep 2019 11:48:51 +0200 Subject: [PATCH 2/6] Update license information --- BwManagementApi.json | 6 +++--- BwManagementApi.yaml | 6 +++--- COPYRIGHT | 12 ------------ LICENSE | 24 ++++++++++++++++++++++++ README.md | 17 ++++------------- 5 files changed, 34 insertions(+), 31 deletions(-) delete mode 100644 COPYRIGHT create mode 100644 LICENSE diff --git a/BwManagementApi.json b/BwManagementApi.json index eb120a2..0b01777 100644 --- a/BwManagementApi.json +++ b/BwManagementApi.json @@ -5,8 +5,8 @@ "version": "1.1.1", "title": "BWM API", "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" + "name": "BSD-3-Clause", + "url": "https://forge.etsi.org/legal-matters" }, "contact": { "email": "cti_support@etsi.org" @@ -662,4 +662,4 @@ } } } -} \ No newline at end of file +} diff --git a/BwManagementApi.yaml b/BwManagementApi.yaml index 11d464f..650124b 100644 --- a/BwManagementApi.yaml +++ b/BwManagementApi.yaml @@ -4,8 +4,8 @@ info: version: 1.1.1 title: BWM API license: - name: ETSI Forge copyright notice - url: https://forge.etsi.org/etsi-forge-copyright-notice.txt + name: BSD-3-Clause + url: https://forge.etsi.org/legal-matters contact: email: cti_support@etsi.org externalDocs: @@ -495,4 +495,4 @@ components: type: string Protocol: description: Protocol number - type: string \ No newline at end of file + type: string diff --git a/COPYRIGHT b/COPYRIGHT deleted file mode 100644 index d5d674d..0000000 --- a/COPYRIGHT +++ /dev/null @@ -1,12 +0,0 @@ -ETSI FORGE COPYRIGHT STATEMENT - -Copyright (c) ETSI 2017. - -This software is subject to copyrights owned by ETSI. Non-exclusive permission is hereby granted, -free of charge, to copy, reproduce and amend this file under the following conditions: -It is provided "as is", without warranty of any kind, expressed or implied. - -ETSI shall never be liable for any claim, damages, or other liability arising from its use or -inability of use. This permission does not apply to any documentation associated with this file -for which ETSI keeps all rights reserved. The present copyright notice shall be included in -all copies of whole or part of this software and shall not imply any sub-license right. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f4fc2ea --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +Copyright 2019 ETSI + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/README.md b/README.md index b15487c..edf4320 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,9 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E * [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/develop/BwManagementApi.yaml). * [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/develop/BwManagementApi.yaml). -## ETSI Forge Copyright statement +## License -Copyright (c) ETSI 2019. - -This software is subject to copyrights owned by ETSI. Non-exclusive permission -is hereby granted, free of charge, to copy, reproduce and amend this file -under the following conditions: It is provided "as is", without warranty of any -kind, expressed or implied. - -ETSI shall never be liable for any claim, damages, or other liability arising -from its use or inability of use.This permission does not apply to any documentation -associated with this file for which ETSI keeps all rights reserved. The present -copyright notice shall be included in all copies of whole or part of this -software and shall not imply any sub-license right. +Unless specified otherwise, the content of this repository and the files contained +are released under the BSD-3-Clause license. +See the attached LICENSE file or visit https://forge.etsi.org/legal-matters. -- GitLab From 45334f00ad8109ae099737a5559556e62d0a2ea6 Mon Sep 17 00:00:00 2001 From: Michel Roy Date: Sat, 24 Oct 2020 10:32:34 -0400 Subject: [PATCH 3/6] added v2.1.1 draft versions --- BwManagementApi.json | 987 +++++++++++++++++++++------------------- BwManagementApi.yaml | 873 ++++++++++++++++++----------------- README.md | 10 +- TrafficSteeringApi.json | 707 ++++++++++++++++++++++++++++ TrafficSteeringApi.yaml | 545 ++++++++++++++++++++++ 5 files changed, 2203 insertions(+), 919 deletions(-) create mode 100644 TrafficSteeringApi.json create mode 100644 TrafficSteeringApi.yaml diff --git a/BwManagementApi.json b/BwManagementApi.json index 0b01777..4a81efb 100644 --- a/BwManagementApi.json +++ b/BwManagementApi.json @@ -1,665 +1,696 @@ { - "openapi": "3.0.2", + "openapi": "3.0.0", "info": { - "description": "The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI", - "version": "1.1.1", - "title": "BWM API", + "title": "ETSI GS MEC 015 Bandwidth Management API", + "version": "2.1.1", + "description": "The ETSI MEC ISG Bandwidth Management API described using OpenAPI.", "license": { "name": "BSD-3-Clause", "url": "https://forge.etsi.org/legal-matters" - }, - "contact": { - "email": "cti_support@etsi.org" } }, "externalDocs": { - "description": "ETSI MEC015 V1.1.1 Bandwidth Management API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf" + "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", + "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" }, "servers": [ { - "url": "http://127.0.0.1:8081/bwm/v1" - }, - { - "url": "https://127.0.0.1:8081/bwm/v1" - } - ], - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "tags": [ - { - "name": "BandwithAllocation" - }, - { - "name": "BandwithAllocations" + "url": "https://{apiRoot}/bwm/v1" } ], "paths": { "/bw_allocations": { "get": { - "description": "This method retrieves information about a list of bandwidthAllocation resources. In queries, either \"app_instance_id\" or \"app_name\" or \"session_Id\" or none of them shall be present.", + "tags": [ + "" + ], + "summary": "Retrieve information about a list of bandwidthAllocation resources", + "description": "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", + "operationId": "bandwidthAllocationListGET", "parameters": [ { - "$ref": "#/components/parameters/Query.AppInstanceId" + "$ref": "#/components/parameters/Query.app_instance_id" }, { - "$ref": "#/components/parameters/Query.AppName" + "$ref": "#/components/parameters/Query.app_name" }, { - "$ref": "#/components/parameters/Query.SessionId" + "$ref": "#/components/parameters/Query.session_id" } ], - "operationId": "BandwithAllocations_GET", - "tags": [ - "BandwithAllocations" - ], "responses": { "200": { - "$ref": "#/components/responses/BandwithAllocations" + "description": "Upon success, a response body containing an array of the bandwidthAllocations is returned.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bwInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } + } }, "400": { - "$ref": "#/components/responses/Error.400" + "$ref": "#/components/responses/400" }, "403": { - "$ref": "#/components/responses/Error.403" + "$ref": "#/components/responses/403" }, "404": { - "$ref": "#/components/responses/Error.404" + "$ref": "#/components/responses/404" } } }, "post": { - "description": "This method is used to create a bandwidthAllocation resource.", - "requestBody": { - "$ref": "#/components/requestBodies/BwInfo" - }, - "operationId": "BandwithAllocations_POST", "tags": [ - "BandwithAllocations" + "" ], + "summary": "Create a bandwidthAllocation resource", + "description": "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1.", + "operationId": "bandwidthAllocationPOST", + "parameters": [], + "requestBody": { + "description": "Entity body in the request contains BwInfo to be created.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bwInfo": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } + }, "responses": { "201": { - "$ref": "#/components/responses/BandwithAllocation.201" + "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "bwInfo" + ], + "properties": { + "bwInfo": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } }, "400": { - "$ref": "#/components/responses/Error.400" + "$ref": "#/components/responses/400" }, "403": { - "$ref": "#/components/responses/Error.403" + "$ref": "#/components/responses/403" }, "404": { - "$ref": "#/components/responses/Error.404" + "$ref": "#/components/responses/404" } } } }, "/bw_allocations/{allocationId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AllocationId" - } - ], "get": { - "description": "This method retrieves information about a specific bandwidthAllocation resource.", - "operationId": "BandwithAllocation_GET", "tags": [ - "BandwithAllocation" + "" + ], + "summary": "Retrieve information about a specific bandwidthAllocation", + "description": "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", + "operationId": "bandwidthAllocationGET", + "parameters": [ + { + "$ref": "#/components/parameters/Path.allocationId" + } ], "responses": { "200": { - "$ref": "#/components/responses/BandwithAllocation" + "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "bwInfo" + ], + "properties": { + "bwInfo": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } }, "400": { - "$ref": "#/components/responses/Error.400" + "$ref": "#/components/responses/400" }, "403": { - "$ref": "#/components/responses/Error.403" + "$ref": "#/components/responses/403" }, "404": { - "$ref": "#/components/responses/Error.404" + "$ref": "#/components/responses/404" } } }, "put": { - "description": "This method updates the information about a specific bandwidthAllocation resource.", + "tags": [ + "" + ], + "summary": "Update the information about a specific bandwidthAllocation", + "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics.", + "operationId": "bandwidthAllocationPUT", "requestBody": { - "$ref": "#/components/requestBodies/BwInfo" + "description": "BwInfo with updated information is included as entity body of the request.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bwInfo": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } }, - "operationId": "BandwithAllocation_PUT", - "tags": [ - "BandwithAllocation" + "parameters": [ + { + "$ref": "#/components/parameters/Path.allocationId" + } ], "responses": { "200": { - "$ref": "#/components/responses/BandwithAllocation" + "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "bwInfo" + ], + "properties": { + "bwInfo": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } }, "400": { - "$ref": "#/components/responses/Error.400" + "$ref": "#/components/responses/400" }, "403": { - "$ref": "#/components/responses/Error.403" + "$ref": "#/components/responses/403" }, "404": { - "$ref": "#/components/responses/Error.404" + "$ref": "#/components/responses/404" }, "412": { - "$ref": "#/components/responses/Error.412" + "$ref": "#/components/responses/412" } } }, "patch": { - "description": "This method updates the information about a specific bandwidthAllocation resource.", + "tags": [ + "" + ], + "summary": "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure", + "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body.", + "operationId": "bandwidthAllocationPATCH", "requestBody": { - "$ref": "#/components/requestBodies/BwInfoDeltas" + "description": "Description of the changes to instruct the server how to modify the resource representation.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bwInfoDeltas": { + "$ref": "#/components/schemas/BwInfoDeltas" + } + } + } + } + } }, - "operationId": "BandwithAllocation_PAT", - "tags": [ - "BandwithAllocation" + "parameters": [ + { + "$ref": "#/components/parameters/Path.allocationId" + } ], "responses": { "200": { - "$ref": "#/components/responses/BandwithAllocation" + "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "bwInfo" + ], + "properties": { + "bwInfo": { + "$ref": "#/components/schemas/BwInfo" + } + } + } + } + } }, "400": { - "$ref": "#/components/responses/Error.400" + "$ref": "#/components/responses/400" }, "403": { - "$ref": "#/components/responses/Error.403" + "$ref": "#/components/responses/403" }, "404": { - "$ref": "#/components/responses/Error.404" + "$ref": "#/components/responses/404" }, "412": { - "$ref": "#/components/responses/Error.412" + "$ref": "#/components/responses/412" } } }, "delete": { - "description": "Remove a specific bandwidthAllocation resource. DELETE method is typically used in \"Unregister from Bandwidth Management Service\" procedure", - "operationId": "BandwithAllocation_DEL", "tags": [ - "BandwithAllocation" + "" + ], + "summary": "Remove a specific bandwidthAllocation", + "description": "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3.", + "operationId": "bandwidthAllocationDELETE", + "parameters": [ + { + "$ref": "#/components/parameters/Path.allocationId" + } ], "responses": { "204": { - "description": "No Content" + "$ref": "#/components/responses/204" }, "403": { - "$ref": "#/components/responses/Error.403" + "$ref": "#/components/responses/403" }, "404": { - "$ref": "#/components/responses/Error.404" + "$ref": "#/components/responses/404" } } } } }, "components": { - "parameters": { - "Path.AllocationId": { - "name": "allocationId", - "in": "path", - "description": "Represents a bandwidth allocation instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.AppInstanceId": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of mobile edge application instances.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.AppName": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple ser_names as an input parameter to query the bandwidth allocation of a list of mobile edge application instances.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.SessionId": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "requestBodies": { - "BwInfo": { - "description": "Bandwidth Allocation information", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } + "responses": { + "204": { + "description": "Upon success, a response 204 No Content without any response body is returned." }, - "BwInfoDeltas": { - "description": "Description of the changes to instruct the server how to modify the Bandwidth Allocation information.", - "required": true, + "400": { + "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BwInfoDeltas" + "type": "object", + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } } } } - } - }, - "links": { - "GetBandwithAllocation": { - "operationId": "BandwithAllocation_GET", - "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'GET .../bw_allocations/{allocationId}''", - "parameters": { - "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", - "allocationId": "TBC" - } }, - "PatBandwithAllocation": { - "operationId": "BandwithAllocation_PAT", - "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PATCH .../bw_allocations/{allocationId}''", - "parameters": { - "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", - "allocationId": "TBC" - } - }, - "PutBandwithAllocation": { - "operationId": "BandwithAllocation_PUT", - "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PUT .../bw_allocations/{allocationId}''", - "parameters": { - "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", - "allocationId": "TBC" - } - }, - "DelBandwithAllocation": { - "operationId": "BandwithAllocation_DEL", - "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'DELETE .../bw_allocations/{allocationId}''", - "parameters": { - "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST ", - "allocationId": "TBC" - } - } - }, - "responses": { - "BandwithAllocation": { - "description": "Bandwidth Allocation.", + "403": { + "description": "Forbidden : operation is not allowed given the current status of the resource.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BwInfo" + "type": "object", + "required": [ + "problemDetails" + ], + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } } } } }, - "BandwithAllocation.201": { - "description": "Bandwidth Allocation.", + "404": { + "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - }, - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" + "type": "object", + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } } } } }, - "BandwithAllocations": { - "description": "Bandwidth Allocations.", + "412": { + "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", "content": { "application/json": { "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/BwInfo" + "type": "object", + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } } } } - }, - "links": { - "getBandwithAllocation": { - "$ref": "#/components/links/GetBandwithAllocation" - }, - "patBandwithAllocation": { - "$ref": "#/components/links/PatBandwithAllocation" - }, - "putBandwithAllocation": { - "$ref": "#/components/links/PutBandwithAllocation" - }, - "delBandwithAllocation": { - "$ref": "#/components/links/DelBandwithAllocation" - } - } - }, - "Error.400": { - "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } } - }, - "Error.401": { - "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } + } + }, + "parameters": { + "Path.allocationId": { + "name": "allocationId", + "in": "path", + "description": "Represents a bandwidth allocation instance", + "required": true, + "schema": { + "type": "string" } }, - "Error.403": { - "description": "Forbidden. The operation is not allowed given the current status of the resource. ", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "Query.app_instance_id": { + "name": "app_instance_id", + "in": "query", + "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } }, - "Error.404": { - "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } + "Query.app_name": { + "name": "app_name", + "in": "query", + "description": "A MEC application instance may use multiple app_names as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } }, - "Error.412": { - "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "securitySchemes": { - "OauthSecurity": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } + "Query.session_id": { + "name": "session_id", + "in": "query", + "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. See note.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" } } } }, "schemas": { - "Empty": { - "description": "Empty schema" - }, - "ProblemDetails": { - "type": "object", + "BwInfo": { "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" + "allocationDirection": { + "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" }, - "title": { - "$ref": "#/components/schemas/Problem.title" + "appInsId": { + "description": "Application instance identifier", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" }, - "status": { - "$ref": "#/components/schemas/Problem.status" + "fixedAllocation": { + "description": "Size of requested fixed BW allocation in [bps]", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" + "fixedBWPriority": { + "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", + "enum": [ + "SEE_DESCRIPTION" + ], + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Enum" }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" + "requestType": { + "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", + "type": "string", + "enum": [ + 0, + 1 + ], + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Enum_inlined" + }, + "sessionFilter": { + "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", + "items": { + "type": "object", + "properties": { + "dstAddress": { + "description": "Destination address identity of session (including range)", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "dstPort": { + "description": "Destination port identity of session", + "items": { + "type": "string" + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "String" + }, + "protocol": { + "description": "Protocol number", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "sourceIp": { + "description": "Source address identity of session (including range)", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "sourcePort": { + "description": "Source port identity of session", + "items": { + "type": "string" + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "String" + } + } + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "Structure (inlined)" + }, + "timeStamp": { + "description": "Time stamp to indicate when the corresponding information elements are sent", + "properties": { + "nanoSeconds": { + "type": "integer", + "format": "uint32", + "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + }, + "seconds": { + "type": "integer", + "format": "uint32", + "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + } + }, + "required": [ + "seconds", + "nanoSeconds" + ], + "type": "object", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Structure (inlined)" } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "BwInfo": { - "description": "information of bandwidth resource", - "type": "object", + }, "required": [ "appInsId", "requestType", "fixedAllocation", "allocationDirection" ], + "type": "object", + "x-etsi-ref": "7.2.2" + }, + "BwInfoDeltas": { "properties": { - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" + "allocationDirection": { + "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" }, "appInsId": { - "$ref": "#/components/schemas/AppInsId" - }, - "requestType": { - "$ref": "#/components/schemas/RequestType" - }, - "sessionFilter": { - "$ref": "#/components/schemas/SessionFilter" - }, - "fixedBWPriority": { - "$ref": "#/components/schemas/FixedBWPriority" + "description": "Application instance identifier", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" }, "fixedAllocation": { - "$ref": "#/components/schemas/FixedAllocation" + "description": "Size of requested fixed BW allocation in [bps]", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" }, - "allocationDirection": { - "$ref": "#/components/schemas/AllocationDirection" - } - } - }, - "BwInfoDeltas": { - "description": "Conform to JSON merge patch format and processing rules specified IETF RFC 7396, this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON", - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/components/schemas/AppInsId" + "fixedBWPriority": { + "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", + "enum": [ + "SEE DESCRIPTION" + ], + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Enum_inlined" }, "requestType": { - "$ref": "#/components/schemas/RequestType" + "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", + "type": "string", + "enum": [ + 0, + 1 + ], + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Enum_inlined" }, "sessionFilter": { - "$ref": "#/components/schemas/SessionFilter" - }, - "fixedBWPriority": { - "$ref": "#/components/schemas/FixedBWPriority" - }, - "fixedAllocation": { - "$ref": "#/components/schemas/FixedAllocation" - }, - "allocationDirection": { - "$ref": "#/components/schemas/AllocationDirection" + "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", + "items": { + "type": "object", + "properties": { + "dstAddress": { + "description": "Destination address identity of session (including range)", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "dstPort": { + "description": "Destination port identity of session", + "items": { + "type": "string" + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "String" + }, + "protocol": { + "description": "Protocol number", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "sourceIp": { + "description": "Source address identity of session (including range)", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "sourcePort": { + "description": "Source port identity of session ", + "items": { + "type": "string" + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "String" + } + } + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "Structure (inlined)" } - } - }, - "TimeStamp": { - "type": "object", + }, "required": [ - "seconds", - "nanoSeconds" + "appInsId", + "requestType" ], + "type": "object", + "x-etsi-ref": "7.2.3" + }, + "ProblemDetails": { "properties": { - "seconds": { - "$ref": "#/components/schemas/Seconds" + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" }, - "nanoSeconds": { - "$ref": "#/components/schemas/NanoSeconds" - } - } - }, - "AppInsId": { - "description": "Application instance identifier", - "type": "string" - }, - "RequestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer", - "type": "string", - "enum": [ - "APPLICATION_SPECIFIC_BW_ALLOCATION", - "SESSION_SPECIFIC_BW_ALLOCATION" - ], - "example": "APPLICATION_SPECIFIC_BW_ALLOCATION" - }, - "SessionFilter": { - "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected", - "type": "array", - "items": { - "type": "object", - "properties": { - "sourceIp": { - "$ref": "#/components/schemas/SourceIp" - }, - "sourcePort": { - "$ref": "#/components/schemas/SourcePort" - }, - "dstAddress": { - "$ref": "#/components/schemas/DstAddress" - }, - "dstPort": { - "$ref": "#/components/schemas/DstPort" - }, - "protocol": { - "$ref": "#/components/schemas/Protocol" - } + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem", + "format": "uri", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "URI" + }, + "status": { + "description": "The HTTP status code for this occurrence of the problem", + "format": "uint32", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "title": { + "description": "A short, human-readable summary of the problem type", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "type": { + "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", + "format": "uri", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "URI" } - } - }, - "FixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "type": "string", - "enum": [ - "not defined in the present document" - ] - }, - "FixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string" - }, - "AllocationDirection": { - "description": "The direction of the requested BW allocation", - "type": "string", - "enum": [ - "00 = Downlink (towards the UE)", - "01 = Uplink (towards the application/session)", - "10 = Symmetrical" - ], - "example": "00" - }, - "Seconds": { - "description": "The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "type": "integer", - "format": "uint32" - }, - "NanoSeconds": { - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "type": "integer", - "format": "uint32" - }, - "SourceIp": { - "description": "Source address identity of session (including range)", - "type": "string" - }, - "SourcePort": { - "description": "Source port identity of session", - "type": "array", - "items": { - "type": "string" - } - }, - "DstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string" - }, - "DstPort": { - "description": "Destination port identity of session", - "type": "array", - "items": { - "type": "string" - } - }, - "Protocol": { - "description": "Protocol number", - "type": "string" + }, + "type": "object" } } } -} +} \ No newline at end of file diff --git a/BwManagementApi.yaml b/BwManagementApi.yaml index 650124b..14ed5be 100644 --- a/BwManagementApi.yaml +++ b/BwManagementApi.yaml @@ -1,498 +1,497 @@ -openapi: 3.0.2 +openapi: 3.0.0 + info: - description: The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI - version: 1.1.1 - title: BWM API + title: 'ETSI GS MEC 015 Bandwidth Management API' + version: 2.1.1 + description: The ETSI MEC ISG Bandwidth Management API described using OpenAPI. license: name: BSD-3-Clause - url: https://forge.etsi.org/legal-matters - contact: - email: cti_support@etsi.org + url: 'https://forge.etsi.org/legal-matters' + externalDocs: - description: ETSI MEC015 V1.1.1 Bandwidth Management API - url: http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf + description: ETSI GS MEC015 V2.1.1 Traffic Management APIs + url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf' + servers: - - url: http://127.0.0.1:8081/bwm/v1 - - url: https://127.0.0.1:8081/bwm/v1 -security: - - OauthSecurity: - - all -tags: - - name: BandwithAllocation - - name: BandwithAllocations + - url: 'https://{apiRoot}/bwm/v1' + paths: - '/bw_allocations': + /bw_allocations: get: - description: >- - This method retrieves information about a list of bandwidthAllocation - resources. In queries, either "app_instance_id" or "app_name" or "session_Id" - or none of them shall be present. - parameters: - - $ref: "#/components/parameters/Query.AppInstanceId" - - $ref: "#/components/parameters/Query.AppName" - - $ref: "#/components/parameters/Query.SessionId" - operationId: BandwithAllocations_GET tags: - - BandwithAllocations + - "" + summary: "Retrieve information about a list of bandwidthAllocation resources" + description: "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5." + operationId: "bandwidthAllocationListGET" + parameters: + - $ref: '#/components/parameters/Query.app_instance_id' + - $ref: '#/components/parameters/Query.app_name' + - $ref: '#/components/parameters/Query.session_id' responses: - '200': - $ref: '#/components/responses/BandwithAllocations' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' + 200: + description: "Upon success, a response body containing an array of the bandwidthAllocations is returned." + content: + application/json: + schema: + type: object + properties: + bwInfo: + type: array + items: + $ref: "#/components/schemas/BwInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' post: - description: >- - This method is used to create a bandwidthAllocation resource. - requestBody: - $ref: "#/components/requestBodies/BwInfo" - operationId: BandwithAllocations_POST tags: - - BandwithAllocations + - "" + summary: "Create a bandwidthAllocation resource" + description: "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1." + operationId: "bandwidthAllocationPOST" + parameters: [] + requestBody: + description: "Entity body in the request contains BwInfo to be created." + required: true + content: + application/json: + schema: + type: object + properties: + bwInfo: + $ref: '#/components/schemas/BwInfo' responses: - '201': - $ref: '#/components/responses/BandwithAllocation.201' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - '/bw_allocations/{allocationId}': - parameters: - - $ref: "#/components/parameters/Path.AllocationId" + 201: + description: "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource." + content: + application/json: + schema: + type: object + required: + - bwInfo + properties: + bwInfo: + $ref: "#/components/schemas/BwInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + /bw_allocations/{allocationId}: get: - description: >- - This method retrieves information about a specific bandwidthAllocation - resource. - operationId: BandwithAllocation_GET tags: - - BandwithAllocation + - "" + summary: "Retrieve information about a specific bandwidthAllocation" + description: "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5." + operationId: "bandwidthAllocationGET" + parameters: + - $ref: '#/components/parameters/Path.allocationId' responses: - '200': - $ref: '#/components/responses/BandwithAllocation' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' + 200: + description: "Used to indicate nonspecific success. The response body contains a representation of the resource." + content: + application/json: + schema: + type: object + required: + - bwInfo + properties: + bwInfo: + $ref: "#/components/schemas/BwInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' put: - description: >- - This method updates the information about a specific - bandwidthAllocation resource. - requestBody: - $ref: "#/components/requestBodies/BwInfo" - operationId: BandwithAllocation_PUT tags: - - BandwithAllocation + - "" + summary: "Update the information about a specific bandwidthAllocation" + description: "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics." + operationId: "bandwidthAllocationPUT" + requestBody: + description: "BwInfo with updated information is included as entity body of the request." + required: true + content: + application/json: + schema: + type: object + properties: + bwInfo: + $ref: '#/components/schemas/BwInfo' + parameters: + - $ref: '#/components/parameters/Path.allocationId' responses: - '200': - $ref: '#/components/responses/BandwithAllocation' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - '412': - $ref: '#/components/responses/Error.412' + 200: + description: "Used to indicate nonspecific success. The response body contains a representation of the resource." + content: + application/json: + schema: + type: object + required: + - bwInfo + properties: + bwInfo: + $ref: "#/components/schemas/BwInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + 412: + $ref: '#/components/responses/412' patch: - description: >- - This method updates the information about a specific - bandwidthAllocation resource. - requestBody: - $ref: '#/components/requestBodies/BwInfoDeltas' - operationId: BandwithAllocation_PAT tags: - - BandwithAllocation + - "" + summary: "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure" + description: "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body." + operationId: "bandwidthAllocationPATCH" + requestBody: + description: "Description of the changes to instruct the server how to modify the resource representation." + required: true + content: + application/json: + schema: + type: object + properties: + bwInfoDeltas: + $ref: '#/components/schemas/BwInfoDeltas' + parameters: + - $ref: '#/components/parameters/Path.allocationId' responses: - '200': - $ref: '#/components/responses/BandwithAllocation' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - '412': - $ref: '#/components/responses/Error.412' + 200: + description: "Used to indicate nonspecific success. The response body contains a representation of the resource." + content: + application/json: + schema: + type: object + required: + - bwInfo + properties: + bwInfo: + $ref: "#/components/schemas/BwInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + 412: + $ref: '#/components/responses/412' delete: - description: >- - Remove a specific bandwidthAllocation resource. DELETE method is - typically used in "Unregister from Bandwidth Management Service" - procedure - operationId: BandwithAllocation_DEL tags: - - BandwithAllocation + - "" + summary: "Remove a specific bandwidthAllocation" + description: "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3." + operationId: "bandwidthAllocationDELETE" + parameters: + - $ref: '#/components/parameters/Path.allocationId' responses: - '204': - description: No Content - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' + 204: + $ref: '#/components/responses/204' + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' components: + responses: + 204: + description: "Upon success, a response 204 No Content without any response body is returned." + 400: + description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' + content: + application/json: + schema: + type: object + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + 403: + description: 'Forbidden : operation is not allowed given the current status of the resource.' + content: + application/json: + schema: + type: object + required: + - problemDetails + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + 404: + description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' + content: + application/json: + schema: + type: object + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + 412: + description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when + using ETags to avoid write conflicts when using PUT' + content: + application/json: + schema: + type: object + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' parameters: - Path.AllocationId: + Path.allocationId: name: allocationId - in: path - description: >- - Represents a bandwidth allocation instance + in: "path" + description: "Represents a bandwidth allocation instance" required: true schema: type: string - Query.AppInstanceId: + Query.app_instance_id: name: app_instance_id - in: query - description: >- - A MEC application instance may use multiple app_instance_ids as - an input parameter to query the bandwidth allocation of a list of mobile - edge application instances. + in: "query" + description: "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note." required: false schema: type: array items: type: string - Query.AppName: + Query.app_name: name: app_name - in: query - description: >- - A MEC application instance may use multiple ser_names as an - input parameter to query the bandwidth allocation of a list of mobile - edge application instances. + in: "query" + description: "A MEC application instance may use multiple app_names as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note." required: false schema: type: array items: type: string - Query.SessionId: + Query.session_id: name: session_id - in: query - description: >- - A MEC application instance may use session_id as an input - parameter to query the bandwidth allocation of a list of sessions. + in: "query" + description: "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. See note." required: false schema: type: array items: type: string - requestBodies: - BwInfo: - description: >- - Bandwidth Allocation information - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/BwInfo" - BwInfoDeltas: - description: >- - Description of the changes to instruct the server how to modify the - Bandwidth Allocation information. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/BwInfoDeltas" - links: - GetBandwithAllocation: - operationId: BandwithAllocation_GET - description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'GET .../bw_allocations/{allocationId}'' - parameters: - description: >- - regex = \/bwm\/v1\/bw_allocations\/(.*); - allocationId = location.match(regex)[1]; - where "location" is the location header uri returned from operationId BandwithAllocations_POST - allocationId: 'TBC' - PatBandwithAllocation: - operationId: BandwithAllocation_PAT - description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PATCH .../bw_allocations/{allocationId}'' - parameters: - description: >- - regex = \/bwm\/v1\/bw_allocations\/(.*); - allocationId = location.match(regex)[1]; - where "location" is the location header uri returned from operationId BandwithAllocations_POST - allocationId: 'TBC' - PutBandwithAllocation: - operationId: BandwithAllocation_PUT - description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PUT .../bw_allocations/{allocationId}'' - parameters: - description: >- - regex = \/bwm\/v1\/bw_allocations\/(.*); - allocationId = location.match(regex)[1]; - where "location" is the location header uri returned from operationId BandwithAllocations_POST - allocationId: 'TBC' - DelBandwithAllocation: - operationId: BandwithAllocation_DEL - description: The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'DELETE .../bw_allocations/{allocationId}'' - parameters: - description: >- - regex = \/bwm\/v1\/bw_allocations\/(.*); - allocationId = location.match(regex)[1]; - where "location" is the location header uri returned from operationId BandwithAllocations_POST - allocationId: 'TBC' - responses: - BandwithAllocation: - description: Bandwidth Allocation. - content: - application/json: - schema: - $ref: "#/components/schemas/BwInfo" - BandwithAllocation.201: - description: Bandwidth Allocation. - content: - application/json: - schema: - $ref: "#/components/schemas/BwInfo" - headers: - location: - description: The resource URI of the created resource - schema: - type: string - format: uri - BandwithAllocations: - description: Bandwidth Allocations. - content: - application/json: - schema: - type: array - minItems: 0 - items: - $ref: "#/components/schemas/BwInfo" - links: - getBandwithAllocation: - $ref: "#/components/links/GetBandwithAllocation" - patBandwithAllocation: - $ref: "#/components/links/PatBandwithAllocation" - putBandwithAllocation: - $ref: "#/components/links/PutBandwithAllocation" - delBandwithAllocation: - $ref: "#/components/links/DelBandwithAllocation" - Error.400: - description: >- - Bad Request. - It is used to indicate that incorrect parameters were passed to the request. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - text/plain: - schema: - $ref: '#/components/schemas/Empty' - Error.401: - description: >- - Unauthorized. - It is used when the client did not submit the appropriate credentials. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - text/plain: - schema: - $ref: '#/components/schemas/Empty' - Error.403: - description: >- - Forbidden. - The operation is not allowed given the current status of the resource. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - Error.404: - description: >- - Not Found. - It is used when a client provided a URI that cannot be mapped - to a valid resource URI. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - text/plain: - schema: - $ref: '#/components/schemas/Empty' - Error.412: - description: >- - Precondition Failed. - It is used when a condition has failed during conditional requests, - e.g. when using ETags to avoid write conflicts. - content: - application/problem+json: - schema: - $ref: '#/components/schemas/ProblemDetails' - text/plain: - schema: - $ref: '#/components/schemas/Empty' - securitySchemes: - OauthSecurity: - type: oauth2 - flows: - clientCredentials: - tokenUrl: https://oauth.exampleAPI/token - scopes: - all: Single oauth2 scope for API schemas: - Empty: - description: Empty schema - ProblemDetails: - type: object - properties: - type: - $ref: "#/components/schemas/Problem.type" - title: - $ref: "#/components/schemas/Problem.title" - status: - $ref: "#/components/schemas/Problem.status" - detail: - $ref: "#/components/schemas/Problem.detail" - instance: - $ref: "#/components/schemas/Problem.instance" - Problem.type: - type: string - format: uri - description: A URI reference according to IETF RFC 3986 that identifies the problem - type - Problem.title: - type: string - description: A short, human-readable summary of the problem type - Problem.status: - type: integer - format: uint32 - description: The HTTP status code for this occurrence of the problem - Problem.detail: - type: string - description: A human-readable explanation specific to this occurrence of the problem - Problem.instance: - type: string - format: uri - description: A URI reference that identifies the specific occurrence of the problem BwInfo: - description: information of bandwidth resource - type: object - required: - - appInsId - - requestType - - fixedAllocation - - allocationDirection properties: - timeStamp: - $ref: "#/components/schemas/TimeStamp" + allocationDirection: + description: 'The direction of the requested BW allocation: + 00 = Downlink (towards the UE) + 01 = Uplink (towards the application/session) + 10 = Symmetrical' + type: string + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: String appInsId: - $ref: "#/components/schemas/AppInsId" + description: Application instance identifier + type: string + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: String + fixedAllocation: + description: Size of requested fixed BW allocation in [bps] + type: string + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: String + fixedBWPriority: + description: Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document + enum: + - SEE_DESCRIPTION + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Enum requestType: - $ref: "#/components/schemas/RequestType" + description: 'Numeric value (0 - 255) corresponding to specific type of consumer as following: + 0 = APPLICATION_SPECIFIC_BW_ALLOCATION + 1 = SESSION_SPECIFIC_BW_ALLOCATION' + type: string + enum: + - 0 + - 1 + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Enum_inlined sessionFilter: - $ref: "#/components/schemas/SessionFilter" - fixedBWPriority: - $ref: "#/components/schemas/FixedBWPriority" - fixedAllocation: - $ref: "#/components/schemas/FixedAllocation" - allocationDirection: - $ref: "#/components/schemas/AllocationDirection" - BwInfoDeltas: - description: Conform to JSON merge patch format and processing rules specified IETF - RFC 7396, this type represents the attributes whose value are - allowed to be updated with HTTP PATCH method in content format JSON + description: Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected + items: + type: object + properties: + dstAddress: + description: Destination address identity of session (including range) + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + dstPort: + description: Destination port identity of session + items: + type: string + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: String + protocol: + description: Protocol number + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + sourceIp: + description: Source address identity of session (including range) + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + sourcePort: + description: Source port identity of session + items: + type: string + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: String + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: Structure (inlined) + timeStamp: + description: Time stamp to indicate when the corresponding information elements are sent + properties: + nanoSeconds: + type: integer + format: uint32 + description: The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + seconds: + type: integer + format: uint32 + description: The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + required: + - seconds + - nanoSeconds + type: object + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Structure (inlined) + required: + - appInsId + - requestType + - fixedAllocation + - allocationDirection type: object + x-etsi-ref: 7.2.2 + BwInfoDeltas: properties: + allocationDirection: + description: 'The direction of the requested BW allocation: + 00 = Downlink (towards the UE) + 01 = Uplink (towards the application/session) + 10 = Symmetrical' + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String appInsId: - $ref: "#/components/schemas/AppInsId" + description: Application instance identifier + type: string + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: String + fixedAllocation: + description: Size of requested fixed BW allocation in [bps] + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + fixedBWPriority: + description: Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document + enum: + - SEE DESCRIPTION + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Enum_inlined requestType: - $ref: "#/components/schemas/RequestType" + description: 'Numeric value (0 - 255) corresponding to specific type of consumer as following: + 0 = APPLICATION_SPECIFIC_BW_ALLOCATION + 1 = SESSION_SPECIFIC_BW_ALLOCATION' + type: string + enum: + - 0 + - 1 + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Enum_inlined sessionFilter: - $ref: "#/components/schemas/SessionFilter" - fixedBWPriority: - $ref: "#/components/schemas/FixedBWPriority" - fixedAllocation: - $ref: "#/components/schemas/FixedAllocation" - allocationDirection: - $ref: "#/components/schemas/AllocationDirection" - TimeStamp: - type: object + description: Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected + items: + type: object + properties: + dstAddress: + description: Destination address identity of session (including range) + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + dstPort: + description: Destination port identity of session + items: + type: string + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: String + protocol: + description: Protocol number + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + sourceIp: + description: Source address identity of session (including range) + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + sourcePort: + description: 'Source port identity of session ' + items: + type: string + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: String + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: Structure (inlined) required: - - seconds - - nanoSeconds + - appInsId + - requestType + type: object + x-etsi-ref: 7.2.3 + ProblemDetails: properties: - seconds: - $ref: "#/components/schemas/Seconds" - nanoSeconds: - $ref: "#/components/schemas/NanoSeconds" - AppInsId: - description: Application instance identifier - type: string - RequestType: - description: Numeric value (0 - 255) corresponding to specific type of consumer - type: string - enum: - - APPLICATION_SPECIFIC_BW_ALLOCATION - - SESSION_SPECIFIC_BW_ALLOCATION - example: - APPLICATION_SPECIFIC_BW_ALLOCATION - SessionFilter: - description: Session filtering criteria, applicable when requestType is set as - SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a - single session only. In case multiple sessions match sessionFilter the - request shall be rejected - type: array - items: - type: object - properties: - sourceIp: - $ref: "#/components/schemas/SourceIp" - sourcePort: - $ref: "#/components/schemas/SourcePort" - dstAddress: - $ref: "#/components/schemas/DstAddress" - dstPort: - $ref: "#/components/schemas/DstPort" - protocol: - $ref: "#/components/schemas/Protocol" - FixedBWPriority: - description: Indicates the allocation priority when dealing with several applications - or sessions in parallel. Values are not defined in the present document - type: string - enum: - - not defined in the present document - FixedAllocation: - description: Size of requested fixed BW allocation in [bps] - type: string - AllocationDirection: - description: The direction of the requested BW allocation - type: string - enum: - - 00 = Downlink (towards the UE) - - 01 = Uplink (towards the application/session) - - 10 = Symmetrical - example: - "00" - Seconds: - description: The seconds part of the Time. Time is defined as Unix-time since January - 1, 1970, 00:00:00 UTC - type: integer - format: uint32 - NanoSeconds: - description: The nanoseconds part of the Time. Time is defined as Unix-time since - January 1, 1970, 00:00:00 UTC - type: integer - format: uint32 - SourceIp: - description: Source address identity of session (including range) - type: string - SourcePort: - description: Source port identity of session - type: array - items: - type: string - DstAddress: - description: Destination address identity of session (including range) - type: string - DstPort: - description: Destination port identity of session - type: array - items: - type: string - Protocol: - description: Protocol number - type: string + detail: + description: A human-readable explanation specific to this occurrence of the problem + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + instance: + description: A URI reference that identifies the specific occurrence of the problem + format: uri + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: URI + status: + description: The HTTP status code for this occurrence of the problem + format: uint32 + type: integer + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + title: + description: A short, human-readable summary of the problem type + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + type: + description: A URI reference according to IETF RFC 3986 that identifies the problem type + format: uri + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: URI + type: object diff --git a/README.md b/README.md index edf4320..8ee82f8 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,14 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E ## Online resources -* [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/develop/BwManagementApi.yaml). -* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/develop/BwManagementApi.yaml). +* [Navigate the Bandwidth Management API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/stf593/BwManagementApi.yaml). +* [Edit the Bandwidth Management API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/stf593/BwManagementApi.yaml). + +* [Navigate the Traffic Steering API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/stf593/TrafficSteeringApi.yaml). +* [Edit the Traffic Steering API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/stf593/TrafficSteeringApi.yaml). ## License -Unless specified otherwise, the content of this repository and the files contained +Unless specified otherwise, the content of this repository and the files contained are released under the BSD-3-Clause license. See the attached LICENSE file or visit https://forge.etsi.org/legal-matters. - diff --git a/TrafficSteeringApi.json b/TrafficSteeringApi.json new file mode 100644 index 0000000..b0832f2 --- /dev/null +++ b/TrafficSteeringApi.json @@ -0,0 +1,707 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "ETSI GS MEC 015 Multi-access Traffic Steering APIs", + "version": "2.1.1", + "description": "The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format.", + "license": { + "name": "BSD-3-Clause", + "url": "https://forge.etsi.org/legal-matters" + } + }, + "externalDocs": { + "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", + "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" + }, + "servers": [ + { + "url": "https://{apiRoot}/mts/v1" + } + ], + "paths": { + "/mts_capability_info": { + "get": { + "tags": [ + "" + ], + "summary": "Retrieve the MTS capability informations", + "description": "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6.", + "operationId": "mtsCapabilityInfoGET", + "parameters": [], + "responses": { + "200": { + "description": "Upon success, a response body containing the MTS capability information is returned.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mtsCapabilityInfo": { + "$ref": "#/components/schemas/MtsCapabilityInfo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/mts_sessions": { + "get": { + "tags": [ + "" + ], + "summary": "Retrieve information about a list of MTS sessions", + "description": "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", + "operationId": "mtsSessionsListGET", + "parameters": [ + { + "$ref": "#/components/parameters/Query.app_instance_id" + }, + { + "$ref": "#/components/parameters/Query.app_name" + }, + { + "$ref": "#/components/parameters/Query.session_id" + } + ], + "responses": { + "200": { + "description": "Upon success, a response body containing an array of the MTS sessions is returned.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mtsSessionInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MtsSessionInfo" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "post": { + "tags": [ + "" + ], + "summary": "Create a MTS session", + "description": "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7.", + "operationId": "mtsSessionPOST", + "parameters": [], + "requestBody": { + "description": "Entity body in the request contains MtsSessionInfo to be created.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "MtsSessionInfo": { + "$ref": "#/components/schemas/MtsSessionInfo" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mtsSessionInfo": { + "$ref": "#/components/schemas/MtsSessionInfo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + }, + "/mts_sessions/{sessionId}": { + "get": { + "tags": [ + "" + ], + "summary": "Retrieve information about specific MTS session", + "description": "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", + "operationId": "mtsSessionGET", + "parameters": [ + { + "$ref": "#/components/parameters/Path.sessionId" + } + ], + "responses": { + "200": { + "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mtsSessionInfo": { + "$ref": "#/components/schemas/MtsSessionInfo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + }, + "put": { + "tags": [ + "" + ], + "summary": "Update the information about specific MTS session", + "description": "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. ", + "operationId": "mtsSessionPUT", + "parameters": [ + { + "$ref": "#/components/parameters/Path.sessionId" + } + ], + "requestBody": { + "description": "MtsSessionInfo with updated information is included as entity body of the request.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mtsSessionInfo": { + "$ref": "#/components/schemas/MtsSessionInfo" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "mtsSessionInfo": { + "$ref": "#/components/schemas/MtsSessionInfo" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "412": { + "$ref": "#/components/responses/412" + } + } + }, + "delete": { + "tags": [ + "" + ], + "summary": "Remove specific MTS session", + "description": "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8.", + "operationId": "mtsSessionDELETE", + "parameters": [ + { + "$ref": "#/components/parameters/Path.sessionId" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + } + } + } + } + }, + "components": { + "responses": { + "204": { + "description": "Upon success, a response 204 No Content without any response body is returned." + }, + "400": { + "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "403": { + "description": "Forbidden : operation is not allowed given the current status of the resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "problemDetails" + ], + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "404": { + "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "412": { + "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "problemDetails": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "parameters": { + "Path.sessionId": { + "name": "sessionId", + "in": "path", + "description": "Represents a MTS session instance", + "required": true, + "schema": { + "type": "string" + } + }, + "Query.app_instance_id": { + "name": "app_instance_id", + "in": "query", + "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the MTS session of a list of MEC application instances. See note.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.app_name": { + "name": "app_name", + "in": "query", + "description": "A MEC application instance may use multiple app_names as an input parameter to query the MTS session of a list of MEC application instances. See note.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.session_id": { + "name": "session_id", + "in": "query", + "description": "A MEC application instance may use session_id as an input parameter to query the information of a list of MTS sessions. See note.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemas": { + "MtsCapabilityInfo": { + "properties": { + "mtsAccessInfo": { + "description": "The information on access network connection as defined below", + "items": { + "type": "object", + "properties": { + "accessId": { + "type": "integer", + "format": "uint32", + "description": "Unique identifier for the access network connection", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + }, + "accessType": { + "type": "integer", + "format": "uint32", + "description": "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology 2 = Any 3GPP-based Cellular technology 3 = Any Fixed Access 11 = IEEE802.11 a/b/g WLAN 12 = IEEE 802.11 a/b/g/n WLAN 13 = IEEE 802.11 a/b/g/n/ac WLAN 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) 15 = IEEE 802.11 b/g/n WLAN 31 = 3GPP GERAN/UTRA (2G/3G) 32 = 3GPP E-UTRA (4G/LTE) 33 = 3GPP NR (5G)", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + }, + "metered": { + "type": "integer", + "format": "uint32", + "description": "Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered 2: unknown ", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + } + } + }, + "required": [ + "accessId", + "accessType", + "metered" + ], + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Structure (inlined)" + }, + "mtsMode": { + "description": "Numeric value corresponding to a specific MTS operation supported by the TMS 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app", + "items": { + "type": "integer", + "format": "uint32" + }, + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Uint32" + }, + "timeStamp": { + "description": "Time stamp to indicate when the corresponding information elements are sent", + "properties": { + "nanoSeconds": { + "type": "integer", + "format": "uint32", + "description": "Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + }, + "seconds": { + "type": "integer", + "format": "uint32", + "description": "Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + } + }, + "required": [ + "seconds", + "nanoSeconds" + ], + "type": "object", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Structure (inlined)" + } + }, + "required": [ + "mtsAccessInfo", + "mtsMode" + ], + "type": "object", + "x-etsi-notes": "NOTE:\tA metered connection is a network connection that has a maximum data usage in a specific period, e.g. per hour/day/week/month. The user may get billed extra charges if they go over the allotted amount.", + "x-etsi-ref": "7.2.4" + }, + "MtsSessionInfo": { + "properties": { + "appInsId": { + "description": "Application instance identifier", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" + }, + "flowFilter": { + "description": "Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering", + "items": { + "type": "object", + "properties": { + "dscp": { + "type": "integer", + "format": "uint32", + "description": "DSCP in the IPv4 header or Traffic Class in the IPv6 header", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "dstIp": { + "description": "Destination address identity of session (including range)", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "dstPort": { + "description": "Destination port identity of session", + "items": { + "type": "integer", + "format": "uint32" + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "Uint32" + }, + "flowlabel": { + "type": "integer", + "format": "uint32", + "description": "Flow Label in the IPv6 header, applicable only if the flow is IPv6", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "protocol": { + "type": "integer", + "format": "uint32", + "description": "Protocol number", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "sourceIp": { + "description": "Source address identity of session (including range)", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "sourcePort": { + "description": "Source port identity of session", + "items": { + "type": "integer", + "format": "uint32" + }, + "minItems": 0, + "type": "array", + "x-etsi-mec-cardinality": "0..N", + "x-etsi-mec-origin-type": "Uint32" + } + } + }, + "minItems": 1, + "type": "array", + "x-etsi-mec-cardinality": "1..N", + "x-etsi-mec-origin-type": "Structure (inlined)" + }, + "mtsMode": { + "type": "integer", + "format": "uint32", + "description": "Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + }, + "qosD": { + "description": "QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS)", + "properties": { + "maxJitter": { + "description": "tolerable jitter in [10 nanoseconds]", + "type": "integer", + "format": "uint32", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "maxLatency": { + "description": "tolerable (one-way) delay in [10 nanoseconds]", + "type": "integer", + "format": "uint32", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "maxLoss": { + "description": "tolerable packet loss rate in [1/10^x]", + "type": "integer", + "format": "uint32", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "minTpt": { + "description": "minimal throughput in [kbps]", + "type": "integer", + "format": "uint32", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "priority": { + "description": "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical", + "type": "integer", + "format": "uint32", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + } + }, + "type": "object", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Structure" + }, + "requestType": { + "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_MTS_SESSION 1 = FLOW_SPECIFIC_MTS_SESSION", + "enum": [ + 0, + 1 + ], + "type": "integer", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Enum_inlined" + }, + "timeStamp": { + "description": "Time stamp to indicate when the corresponding information elements are sent ", + "properties": { + "nanoSeconds": { + "type": "integer", + "format": "uint32", + "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + }, + "seconds": { + "type": "integer", + "format": "uint32", + "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "Uint32" + } + }, + "required": [ + "seconds", + "nanoSeconds" + ], + "type": "object", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Structure (inlined)" + }, + "trafficDirection": { + "description": "The direction of the requested MTS session: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical (see note) ", + "type": "string", + "x-etsi-mec-cardinality": "1", + "x-etsi-mec-origin-type": "String" + } + }, + "required": [ + "appInsId", + "requestType", + "flowFilter", + "qosD", + "mtsMode", + "trafficDirection" + ], + "type": "object", + "x-etsi-notes": "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" in the \"flowFilter\" structure are used for source address and port, respectively; \"dstIp\" and \"dstPort\" are used for destination address and port, respectively. For the uplink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" are used for destination address and port, respectively; \"dstIp\" and \"dstPort\" are used for source address and port, respectively.", + "x-etsi-ref": "7.2.5" + }, + "ProblemDetails": { + "properties": { + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem", + "format": "uri", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "URI" + }, + "status": { + "description": "The HTTP status code for this occurrence of the problem", + "format": "uint32", + "type": "integer", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "Uint32" + }, + "title": { + "description": "A short, human-readable summary of the problem type", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "String" + }, + "type": { + "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", + "format": "uri", + "type": "string", + "x-etsi-mec-cardinality": "0..1", + "x-etsi-mec-origin-type": "URI" + } + }, + "type": "object" + } + } + } +} \ No newline at end of file diff --git a/TrafficSteeringApi.yaml b/TrafficSteeringApi.yaml new file mode 100644 index 0000000..fcd7f4d --- /dev/null +++ b/TrafficSteeringApi.yaml @@ -0,0 +1,545 @@ +openapi: 3.0.0 + +info: + title: 'ETSI GS MEC 015 Multi-access Traffic Steering APIs' + version: 2.1.1 + description: The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format. + license: + name: BSD-3-Clause + url: 'https://forge.etsi.org/legal-matters' + +externalDocs: + description: ETSI GS MEC015 V2.1.1 Traffic Management APIs + url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf' + +servers: + - url: 'https://{apiRoot}/mts/v1' + +paths: + /mts_capability_info: + get: + tags: + - "" + summary: "Retrieve the MTS capability informations" + description: "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6." + operationId: "mtsCapabilityInfoGET" + parameters: [] + responses: + 200: + description: "Upon success, a response body containing the MTS capability information is returned." + content: + application/json: + schema: + type: object + properties: + mtsCapabilityInfo: + $ref: "#/components/schemas/MtsCapabilityInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + /mts_sessions: + get: + tags: + - "" + summary: "Retrieve information about a list of MTS sessions" + description: "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10." + operationId: "mtsSessionsListGET" + parameters: + - $ref: '#/components/parameters/Query.app_instance_id' + - $ref: '#/components/parameters/Query.app_name' + - $ref: '#/components/parameters/Query.session_id' + responses: + 200: + description: "Upon success, a response body containing an array of the MTS sessions is returned." + content: + application/json: + schema: + type: object + properties: + mtsSessionInfo: + type: array + items: + $ref: "#/components/schemas/MtsSessionInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + post: + tags: + - "" + summary: "Create a MTS session" + description: "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7." + operationId: "mtsSessionPOST" + parameters: [] + requestBody: + description: "Entity body in the request contains MtsSessionInfo to be created." + required: true + content: + application/json: + schema: + type: object + properties: + MtsSessionInfo: + $ref: '#/components/schemas/MtsSessionInfo' + responses: + 201: + description: "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource." + content: + application/json: + schema: + type: object + properties: + mtsSessionInfo: + $ref: "#/components/schemas/MtsSessionInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + /mts_sessions/{sessionId}: + get: + tags: + - "" + summary: "Retrieve information about specific MTS session" + description: "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10." + operationId: "mtsSessionGET" + parameters: + - $ref: '#/components/parameters/Path.sessionId' + responses: + 200: + description: "Used to indicate nonspecific success. The response body contains a representation of the resource." + content: + application/json: + schema: + type: object + properties: + mtsSessionInfo: + $ref: "#/components/schemas/MtsSessionInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + put: + tags: + - "" + summary: "Update the information about specific MTS session" + description: "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. " + operationId: "mtsSessionPUT" + parameters: + - $ref: '#/components/parameters/Path.sessionId' + requestBody: + description: "MtsSessionInfo with updated information is included as entity body of the request." + required: true + content: + application/json: + schema: + type: object + properties: + mtsSessionInfo: + $ref: '#/components/schemas/MtsSessionInfo' + responses: + 200: + description: "Used to indicate nonspecific success. The response body contains a representation of the resource." + content: + application/json: + schema: + type: object + properties: + mtsSessionInfo: + $ref: "#/components/schemas/MtsSessionInfo" + 400: + $ref: "#/components/responses/400" + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' + 412: + $ref: '#/components/responses/412' + delete: + tags: + - "" + summary: "Remove specific MTS session" + description: "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8." + operationId: "mtsSessionDELETE" + parameters: + - $ref: '#/components/parameters/Path.sessionId' + responses: + 204: + $ref: '#/components/responses/204' + 403: + $ref: '#/components/responses/403' + 404: + $ref: '#/components/responses/404' +components: + responses: + 204: + description: "Upon success, a response 204 No Content without any response body is returned." + 400: + description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' + content: + application/json: + schema: + type: object + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + 403: + description: 'Forbidden : operation is not allowed given the current status of the resource.' + content: + application/json: + schema: + type: object + required: + - problemDetails + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + 404: + description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' + content: + application/json: + schema: + type: object + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + 412: + description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when + using ETags to avoid write conflicts when using PUT' + content: + application/json: + schema: + type: object + properties: + problemDetails: + $ref: '#/components/schemas/ProblemDetails' + parameters: + Path.sessionId: + name: sessionId + in: "path" + description: "Represents a MTS session instance" + required: true + schema: + type: string + Query.app_instance_id: + name: app_instance_id + in: "query" + description: "A MEC application instance may use multiple app_instance_ids as an input parameter to query the MTS session of a list of MEC application instances. See note." + required: false + schema: + type: array + items: + type: string + Query.app_name: + name: app_name + in: "query" + description: "A MEC application instance may use multiple app_names as an input parameter to query the MTS session of a list of MEC application instances. See note." + required: false + schema: + type: array + items: + type: string + Query.session_id: + name: session_id + in: "query" + description: "A MEC application instance may use session_id as an input parameter to query the information of a list of MTS sessions. See note." + required: false + schema: + type: array + items: + type: string + schemas: + MtsCapabilityInfo: + properties: + mtsAccessInfo: + description: The information on access network connection as defined below + items: + type: object + properties: + accessId: + type: integer + format: uint32 + description: Unique identifier for the access network connection + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + accessType: + type: integer + format: uint32 + description: "Numeric value (0-255) corresponding to specific type of access network as following: + 0 = Unknown + 1 = Any IEEE802.11-based WLAN technology + 2 = Any 3GPP-based Cellular technology + 3 = Any Fixed Access + 11 = IEEE802.11 a/b/g WLAN + 12 = IEEE 802.11 a/b/g/n WLAN + 13 = IEEE 802.11 a/b/g/n/ac WLAN + 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) + 15 = IEEE 802.11 b/g/n WLAN + 31 = 3GPP GERAN/UTRA (2G/3G) + 32 = 3GPP E-UTRA (4G/LTE) + 33 = 3GPP NR (5G)" + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + metered: + type: integer + format: uint32 + description: 'Numeric value (0-255) corresponding to the following: + 0: the connection is not metered (see note) + 1: the connection is metered + 2: unknown ' + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + required: + - accessId + - accessType + - metered + minItems: 1 + type: array + x-etsi-mec-cardinality: 1..N + x-etsi-mec-origin-type: Structure (inlined) + mtsMode: + description: 'Numeric value corresponding to a specific MTS operation supported by the TMS + 0 = low cost, i.e. using the unmetered access network connection whenever it is available + 1 = low latency, i.e. using the access network connection with lower latency + 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported + 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications + 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app' + items: + type: integer + format: uint32 + minItems: 1 + type: array + x-etsi-mec-cardinality: 1..N + x-etsi-mec-origin-type: Uint32 + timeStamp: + description: Time stamp to indicate when the corresponding information elements are sent + properties: + nanoSeconds: + type: integer + format: uint32 + description: Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + seconds: + type: integer + format: uint32 + description: Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + required: + - seconds + - nanoSeconds + type: object + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Structure (inlined) + required: + - mtsAccessInfo + - mtsMode + type: object + x-etsi-notes: "NOTE:\tA metered connection is a network connection that has\ + \ a maximum data usage in a specific period, e.g. per hour/day/week/month.\ + \ The user may get billed extra charges if they go over the allotted amount." + x-etsi-ref: 7.2.4 + MtsSessionInfo: + properties: + appInsId: + description: Application instance identifier + type: string + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: String + flowFilter: + description: Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering + items: + type: object + properties: + dscp: + type: integer + format: uint32 + description: DSCP in the IPv4 header or Traffic Class in the IPv6 header + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + dstIp: + description: Destination address identity of session (including range) + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + dstPort: + description: Destination port identity of session + items: + type: integer + format: uint32 + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: Uint32 + flowlabel: + type: integer + format: uint32 + description: Flow Label in the IPv6 header, applicable only if the flow is IPv6 + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + protocol: + type: integer + format: uint32 + description: Protocol number + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + sourceIp: + description: Source address identity of session (including range) + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + sourcePort: + description: Source port identity of session + items: + type: integer + format: uint32 + minItems: 0 + type: array + x-etsi-mec-cardinality: 0..N + x-etsi-mec-origin-type: Uint32 + minItems: 1 + type: array + x-etsi-mec-cardinality: 1..N + x-etsi-mec-origin-type: Structure (inlined) + mtsMode: + type: integer + format: uint32 + description: 'Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: + 0 = low cost, i.e. using the unmetered access network connection whenever it is available + 1 = low latency, i.e. using the access network connection with lower latency + 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously + 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications + 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)' + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + qosD: + description: QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS) + properties: + maxJitter: + description: tolerable jitter in [10 nanoseconds] + type: integer + format: uint32 + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + maxLatency: + description: tolerable (one-way) delay in [10 nanoseconds] + type: integer + format: uint32 + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + maxLoss: + description: tolerable packet loss rate in [1/10^x] + type: integer + format: uint32 + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + minTpt: + description: minimal throughput in [kbps] + type: integer + format: uint32 + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + priority: + description: "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical" + type: integer + format: uint32 + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + type: object + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Structure + requestType: + description: 'Numeric value (0 - 255) corresponding to specific type of consumer as following: + 0 = APPLICATION_SPECIFIC_MTS_SESSION + 1 = FLOW_SPECIFIC_MTS_SESSION' + enum: + - 0 + - 1 + type: integer + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Enum_inlined + timeStamp: + description: 'Time stamp to indicate when the corresponding information elements are sent ' + properties: + nanoSeconds: + type: integer + format: uint32 + description: The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + seconds: + type: integer + format: uint32 + description: The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: Uint32 + required: + - seconds + - nanoSeconds + type: object + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Structure (inlined) + trafficDirection: + description: 'The direction of the requested MTS session: + 00 = Downlink (towards the UE) + 01 = Uplink (towards the application/session) + 10 = Symmetrical (see note) ' + type: string + x-etsi-mec-cardinality: '1' + x-etsi-mec-origin-type: String + required: + - appInsId + - requestType + - flowFilter + - qosD + - mtsMode + - trafficDirection + type: object + x-etsi-notes: "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\"\ + \ and \"sourcePort\" in the \"flowFilter\" structure are used for source address\ + \ and port, respectively; \"dstIp\" and \"dstPort\" are used for destination\ + \ address and port, respectively. For the uplink direction of a symmetrical\ + \ flow, \"sourceIp\" and \"sourcePort\" are used for destination address and\ + \ port, respectively; \"dstIp\" and \"dstPort\" are used for source address\ + \ and port, respectively." + x-etsi-ref: 7.2.5 + ProblemDetails: + properties: + detail: + description: A human-readable explanation specific to this occurrence of the problem + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + instance: + description: A URI reference that identifies the specific occurrence of the problem + format: uri + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: URI + status: + description: The HTTP status code for this occurrence of the problem + format: uint32 + type: integer + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: Uint32 + title: + description: A short, human-readable summary of the problem type + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: String + type: + description: A URI reference according to IETF RFC 3986 that identifies the problem type + format: uri + type: string + x-etsi-mec-cardinality: 0..1 + x-etsi-mec-origin-type: URI + type: object -- GitLab From 8731972df1dfb98334d2924574ac5700d256fc17 Mon Sep 17 00:00:00 2001 From: Michele Carignani Date: Mon, 26 Oct 2020 18:12:38 +0100 Subject: [PATCH 4/6] update ci to oas 3 --- .jenkins.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.jenkins.sh b/.jenkins.sh index 417488f..74d0370 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -1,16 +1,18 @@ #!/bin/bash -specfiles=$(ls | egrep "^[^.]*Api.(json|yaml)") +specfiles=$(ls | egrep "^[^.]*.(json|yaml)") fres=0 for i in $specfiles ; do - echo "-- Validating OpenAPI file $i..." - swagger-tools validate $i + echo "-- Validating and linting OpenAPI file $i..." + swagger-cli validate $i res=$? - fres=$(($fres||$res)) - echo -e "-- Validator returned $res.\n" + speccy lint "$i" + res2=$? + fres=$(($fres||$res||$res2)) + echo "--- Validator returned $res, linter returned $res2." done echo "-- Final validator returns $fres." +exit $fres -exit $fres \ No newline at end of file -- GitLab From ffa8d711c1cdf15b92ea8235242e0dd59cda8830 Mon Sep 17 00:00:00 2001 From: Michel Roy Date: Fri, 6 Nov 2020 02:11:38 -0500 Subject: [PATCH 5/6] review update --- BwManagementApi.json | 30 ++++++++++++-------- BwManagementApi.yaml | 28 +++++++++++-------- TrafficSteeringApi.json | 62 +++++++++++++++++++++++------------------ TrafficSteeringApi.yaml | 60 ++++++++++++++++++++------------------- 4 files changed, 102 insertions(+), 78 deletions(-) diff --git a/BwManagementApi.json b/BwManagementApi.json index 4a81efb..5c21256 100644 --- a/BwManagementApi.json +++ b/BwManagementApi.json @@ -1,6 +1,9 @@ { "openapi": "3.0.0", "info": { + "contact": { + "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" + }, "title": "ETSI GS MEC 015 Bandwidth Management API", "version": "2.1.1", "description": "The ETSI MEC ISG Bandwidth Management API described using OpenAPI.", @@ -15,14 +18,19 @@ }, "servers": [ { - "url": "https://{apiRoot}/bwm/v1" + "url": "https://localhost/bwm/v1" + } + ], + "tags": [ + { + "name": "bwm" } ], "paths": { "/bw_allocations": { "get": { "tags": [ - "" + "bwm" ], "summary": "Retrieve information about a list of bandwidthAllocation resources", "description": "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", @@ -70,7 +78,7 @@ }, "post": { "tags": [ - "" + "bwm" ], "summary": "Create a bandwidthAllocation resource", "description": "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1.", @@ -126,7 +134,7 @@ "/bw_allocations/{allocationId}": { "get": { "tags": [ - "" + "bwm" ], "summary": "Retrieve information about a specific bandwidthAllocation", "description": "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", @@ -168,7 +176,7 @@ }, "put": { "tags": [ - "" + "bwm" ], "summary": "Update the information about a specific bandwidthAllocation", "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics.", @@ -229,7 +237,7 @@ }, "patch": { "tags": [ - "" + "bwm" ], "summary": "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure", "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body.", @@ -290,7 +298,7 @@ }, "delete": { "tags": [ - "" + "bwm" ], "summary": "Remove a specific bandwidthAllocation", "description": "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3.", @@ -462,7 +470,7 @@ }, "requestType": { "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "string", + "type": "integer", "enum": [ 0, 1 @@ -525,14 +533,14 @@ "properties": { "nanoSeconds": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" }, "seconds": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" @@ -670,7 +678,7 @@ }, "status": { "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", + "format": "int32", "type": "integer", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" diff --git a/BwManagementApi.yaml b/BwManagementApi.yaml index 14ed5be..bcd1f47 100644 --- a/BwManagementApi.yaml +++ b/BwManagementApi.yaml @@ -1,6 +1,7 @@ openapi: 3.0.0 - info: + contact: + url: https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api title: 'ETSI GS MEC 015 Bandwidth Management API' version: 2.1.1 description: The ETSI MEC ISG Bandwidth Management API described using OpenAPI. @@ -13,13 +14,16 @@ externalDocs: url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf' servers: - - url: 'https://{apiRoot}/bwm/v1' + - url: 'https://localhost/bwm/v1' + +tags: +- name: "bwm" paths: /bw_allocations: get: tags: - - "" + - "bwm" summary: "Retrieve information about a list of bandwidthAllocation resources" description: "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5." operationId: "bandwidthAllocationListGET" @@ -47,7 +51,7 @@ paths: $ref: '#/components/responses/404' post: tags: - - "" + - "bwm" summary: "Create a bandwidthAllocation resource" description: "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1." operationId: "bandwidthAllocationPOST" @@ -83,7 +87,7 @@ paths: /bw_allocations/{allocationId}: get: tags: - - "" + - "bwm" summary: "Retrieve information about a specific bandwidthAllocation" description: "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5." operationId: "bandwidthAllocationGET" @@ -109,7 +113,7 @@ paths: $ref: '#/components/responses/404' put: tags: - - "" + - "bwm" summary: "Update the information about a specific bandwidthAllocation" description: "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics." operationId: "bandwidthAllocationPUT" @@ -147,7 +151,7 @@ paths: $ref: '#/components/responses/412' patch: tags: - - "" + - "bwm" summary: "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure" description: "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body." operationId: "bandwidthAllocationPATCH" @@ -185,7 +189,7 @@ paths: $ref: '#/components/responses/412' delete: tags: - - "" + - "bwm" summary: "Remove a specific bandwidthAllocation" description: "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3." operationId: "bandwidthAllocationDELETE" @@ -308,7 +312,7 @@ components: description: 'Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION' - type: string + type: integer enum: - 0 - 1 @@ -359,13 +363,13 @@ components: properties: nanoSeconds: type: integer - format: uint32 + format: int32 description: The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 seconds: type: integer - format: uint32 + format: int32 description: The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 @@ -479,7 +483,7 @@ components: x-etsi-mec-origin-type: URI status: description: The HTTP status code for this occurrence of the problem - format: uint32 + format: int32 type: integer x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 diff --git a/TrafficSteeringApi.json b/TrafficSteeringApi.json index b0832f2..ec16069 100644 --- a/TrafficSteeringApi.json +++ b/TrafficSteeringApi.json @@ -1,6 +1,9 @@ { "openapi": "3.0.0", "info": { + "contact": { + "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" + }, "title": "ETSI GS MEC 015 Multi-access Traffic Steering APIs", "version": "2.1.1", "description": "The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format.", @@ -15,14 +18,19 @@ }, "servers": [ { - "url": "https://{apiRoot}/mts/v1" + "url": "https://localhost/mts/v1" + } + ], + "tags": [ + { + "name": "mts" } ], "paths": { "/mts_capability_info": { "get": { "tags": [ - "" + "mts" ], "summary": "Retrieve the MTS capability informations", "description": "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6.", @@ -59,7 +67,7 @@ "/mts_sessions": { "get": { "tags": [ - "" + "mts" ], "summary": "Retrieve information about a list of MTS sessions", "description": "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", @@ -107,7 +115,7 @@ }, "post": { "tags": [ - "" + "mts" ], "summary": "Create a MTS session", "description": "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7.", @@ -160,7 +168,7 @@ "/mts_sessions/{sessionId}": { "get": { "tags": [ - "" + "mts" ], "summary": "Retrieve information about specific MTS session", "description": "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", @@ -199,7 +207,7 @@ }, "put": { "tags": [ - "" + "mts" ], "summary": "Update the information about specific MTS session", "description": "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. ", @@ -257,7 +265,7 @@ }, "delete": { "tags": [ - "" + "mts" ], "summary": "Remove specific MTS session", "description": "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8.", @@ -407,21 +415,21 @@ "properties": { "accessId": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Unique identifier for the access network connection", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" }, "accessType": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology 2 = Any 3GPP-based Cellular technology 3 = Any Fixed Access 11 = IEEE802.11 a/b/g WLAN 12 = IEEE 802.11 a/b/g/n WLAN 13 = IEEE 802.11 a/b/g/n/ac WLAN 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) 15 = IEEE 802.11 b/g/n WLAN 31 = 3GPP GERAN/UTRA (2G/3G) 32 = 3GPP E-UTRA (4G/LTE) 33 = 3GPP NR (5G)", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" }, "metered": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered 2: unknown ", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" @@ -442,7 +450,7 @@ "description": "Numeric value corresponding to a specific MTS operation supported by the TMS 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app", "items": { "type": "integer", - "format": "uint32" + "format": "int32" }, "minItems": 1, "type": "array", @@ -454,14 +462,14 @@ "properties": { "nanoSeconds": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" }, "seconds": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" @@ -499,7 +507,7 @@ "properties": { "dscp": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "DSCP in the IPv4 header or Traffic Class in the IPv6 header", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" @@ -514,7 +522,7 @@ "description": "Destination port identity of session", "items": { "type": "integer", - "format": "uint32" + "format": "int32" }, "minItems": 0, "type": "array", @@ -523,14 +531,14 @@ }, "flowlabel": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Flow Label in the IPv6 header, applicable only if the flow is IPv6", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" }, "protocol": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Protocol number", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" @@ -545,7 +553,7 @@ "description": "Source port identity of session", "items": { "type": "integer", - "format": "uint32" + "format": "int32" }, "minItems": 0, "type": "array", @@ -561,7 +569,7 @@ }, "mtsMode": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" @@ -572,35 +580,35 @@ "maxJitter": { "description": "tolerable jitter in [10 nanoseconds]", "type": "integer", - "format": "uint32", + "format": "int32", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" }, "maxLatency": { "description": "tolerable (one-way) delay in [10 nanoseconds]", "type": "integer", - "format": "uint32", + "format": "int32", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" }, "maxLoss": { "description": "tolerable packet loss rate in [1/10^x]", "type": "integer", - "format": "uint32", + "format": "int32", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" }, "minTpt": { "description": "minimal throughput in [kbps]", "type": "integer", - "format": "uint32", + "format": "int32", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" }, "priority": { "description": "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical", "type": "integer", - "format": "uint32", + "format": "int32", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" } @@ -624,14 +632,14 @@ "properties": { "nanoSeconds": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" }, "seconds": { "type": "integer", - "format": "uint32", + "format": "int32", "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", "x-etsi-mec-cardinality": "1", "x-etsi-mec-origin-type": "Uint32" @@ -681,7 +689,7 @@ }, "status": { "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", + "format": "int32", "type": "integer", "x-etsi-mec-cardinality": "0..1", "x-etsi-mec-origin-type": "Uint32" diff --git a/TrafficSteeringApi.yaml b/TrafficSteeringApi.yaml index fcd7f4d..bab7001 100644 --- a/TrafficSteeringApi.yaml +++ b/TrafficSteeringApi.yaml @@ -1,6 +1,7 @@ openapi: 3.0.0 - info: + contact: + url: https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api title: 'ETSI GS MEC 015 Multi-access Traffic Steering APIs' version: 2.1.1 description: The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format. @@ -13,13 +14,16 @@ externalDocs: url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf' servers: - - url: 'https://{apiRoot}/mts/v1' + - url: 'https://localhost/mts/v1' + +tags: +- name: "mts" paths: /mts_capability_info: get: tags: - - "" + - "mts" summary: "Retrieve the MTS capability informations" description: "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6." operationId: "mtsCapabilityInfoGET" @@ -43,7 +47,7 @@ paths: /mts_sessions: get: tags: - - "" + - "mts" summary: "Retrieve information about a list of MTS sessions" description: "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10." operationId: "mtsSessionsListGET" @@ -71,7 +75,7 @@ paths: $ref: '#/components/responses/404' post: tags: - - "" + - "mts" summary: "Create a MTS session" description: "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7." operationId: "mtsSessionPOST" @@ -105,7 +109,7 @@ paths: /mts_sessions/{sessionId}: get: tags: - - "" + - "mts" summary: "Retrieve information about specific MTS session" description: "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10." operationId: "mtsSessionGET" @@ -129,7 +133,7 @@ paths: $ref: '#/components/responses/404' put: tags: - - "" + - "mts" summary: "Update the information about specific MTS session" description: "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. " operationId: "mtsSessionPUT" @@ -165,7 +169,7 @@ paths: $ref: '#/components/responses/412' delete: tags: - - "" + - "mts" summary: "Remove specific MTS session" description: "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8." operationId: "mtsSessionDELETE" @@ -266,13 +270,13 @@ components: properties: accessId: type: integer - format: uint32 + format: int32 description: Unique identifier for the access network connection x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 accessType: type: integer - format: uint32 + format: int32 description: "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology @@ -290,7 +294,7 @@ components: x-etsi-mec-origin-type: Uint32 metered: type: integer - format: uint32 + format: int32 description: 'Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered @@ -314,7 +318,7 @@ components: 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app' items: type: integer - format: uint32 + format: int32 minItems: 1 type: array x-etsi-mec-cardinality: 1..N @@ -324,13 +328,13 @@ components: properties: nanoSeconds: type: integer - format: uint32 + format: int32 description: Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 seconds: type: integer - format: uint32 + format: int32 description: Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 @@ -362,7 +366,7 @@ components: properties: dscp: type: integer - format: uint32 + format: int32 description: DSCP in the IPv4 header or Traffic Class in the IPv6 header x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 @@ -375,20 +379,20 @@ components: description: Destination port identity of session items: type: integer - format: uint32 + format: int32 minItems: 0 type: array x-etsi-mec-cardinality: 0..N x-etsi-mec-origin-type: Uint32 flowlabel: type: integer - format: uint32 + format: int32 description: Flow Label in the IPv6 header, applicable only if the flow is IPv6 x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 protocol: type: integer - format: uint32 + format: int32 description: Protocol number x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 @@ -401,7 +405,7 @@ components: description: Source port identity of session items: type: integer - format: uint32 + format: int32 minItems: 0 type: array x-etsi-mec-cardinality: 0..N @@ -412,7 +416,7 @@ components: x-etsi-mec-origin-type: Structure (inlined) mtsMode: type: integer - format: uint32 + format: int32 description: 'Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency @@ -427,31 +431,31 @@ components: maxJitter: description: tolerable jitter in [10 nanoseconds] type: integer - format: uint32 + format: int32 x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 maxLatency: description: tolerable (one-way) delay in [10 nanoseconds] type: integer - format: uint32 + format: int32 x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 maxLoss: description: tolerable packet loss rate in [1/10^x] type: integer - format: uint32 + format: int32 x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 minTpt: description: minimal throughput in [kbps] type: integer - format: uint32 + format: int32 x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 priority: description: "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical" type: integer - format: uint32 + format: int32 x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 type: object @@ -472,13 +476,13 @@ components: properties: nanoSeconds: type: integer - format: uint32 + format: int32 description: The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 seconds: type: integer - format: uint32 + format: int32 description: The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC x-etsi-mec-cardinality: '1' x-etsi-mec-origin-type: Uint32 @@ -527,7 +531,7 @@ components: x-etsi-mec-origin-type: URI status: description: The HTTP status code for this occurrence of the problem - format: uint32 + format: int32 type: integer x-etsi-mec-cardinality: 0..1 x-etsi-mec-origin-type: Uint32 -- GitLab From dba844ed286a73ec453ceee06a415bbfb3a850bd Mon Sep 17 00:00:00 2001 From: Michel Roy Date: Thu, 12 Nov 2020 20:58:45 -0500 Subject: [PATCH 6/6] implicit naming --- BwManagementApi.json | 111 +++++++--------------------------------- BwManagementApi.yaml | 82 +++++++---------------------- TrafficSteeringApi.json | 92 ++++++--------------------------- TrafficSteeringApi.yaml | 69 ++++++------------------- 4 files changed, 70 insertions(+), 284 deletions(-) diff --git a/BwManagementApi.json b/BwManagementApi.json index 5c21256..9d78c26 100644 --- a/BwManagementApi.json +++ b/BwManagementApi.json @@ -52,14 +52,9 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "bwInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BwInfo" - } - } + "type": "array", + "items": { + "$ref": "#/components/schemas/BwInfo" } } } @@ -90,12 +85,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "bwInfo": { - "$ref": "#/components/schemas/BwInfo" - } - } + "$ref": "#/components/schemas/BwInfo" } } } @@ -106,15 +96,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/components/schemas/BwInfo" - } - } + "$ref": "#/components/schemas/BwInfo" } } } @@ -150,15 +132,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/components/schemas/BwInfo" - } - } + "$ref": "#/components/schemas/BwInfo" } } } @@ -187,12 +161,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "bwInfo": { - "$ref": "#/components/schemas/BwInfo" - } - } + "$ref": "#/components/schemas/BwInfo" } } } @@ -208,15 +177,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/components/schemas/BwInfo" - } - } + "$ref": "#/components/schemas/BwInfo" } } } @@ -248,12 +209,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "bwInfoDeltas": { - "$ref": "#/components/schemas/BwInfoDeltas" - } - } + "$ref": "#/components/schemas/BwInfoDeltas" } } } @@ -269,15 +225,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "bwInfo" - ], - "properties": { - "bwInfo": { - "$ref": "#/components/schemas/BwInfo" - } - } + "$ref": "#/components/schemas/BwInfo" } } } @@ -330,14 +278,9 @@ "400": { "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } @@ -345,17 +288,9 @@ "403": { "description": "Forbidden : operation is not allowed given the current status of the resource.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "required": [ - "problemDetails" - ], - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } @@ -363,14 +298,9 @@ "404": { "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } @@ -378,14 +308,9 @@ "412": { "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } diff --git a/BwManagementApi.yaml b/BwManagementApi.yaml index bcd1f47..abd76b6 100644 --- a/BwManagementApi.yaml +++ b/BwManagementApi.yaml @@ -37,12 +37,9 @@ paths: content: application/json: schema: - type: object - properties: - bwInfo: - type: array - items: - $ref: "#/components/schemas/BwInfo" + type: array + items: + $ref: "#/components/schemas/BwInfo" 400: $ref: "#/components/responses/400" 403: @@ -62,22 +59,14 @@ paths: content: application/json: schema: - type: object - properties: - bwInfo: - $ref: '#/components/schemas/BwInfo' + $ref: '#/components/schemas/BwInfo' responses: 201: description: "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource." content: application/json: schema: - type: object - required: - - bwInfo - properties: - bwInfo: - $ref: "#/components/schemas/BwInfo" + $ref: "#/components/schemas/BwInfo" 400: $ref: "#/components/responses/400" 403: @@ -99,12 +88,7 @@ paths: content: application/json: schema: - type: object - required: - - bwInfo - properties: - bwInfo: - $ref: "#/components/schemas/BwInfo" + $ref: "#/components/schemas/BwInfo" 400: $ref: "#/components/responses/400" 403: @@ -123,10 +107,7 @@ paths: content: application/json: schema: - type: object - properties: - bwInfo: - $ref: '#/components/schemas/BwInfo' + $ref: '#/components/schemas/BwInfo' parameters: - $ref: '#/components/parameters/Path.allocationId' responses: @@ -135,12 +116,7 @@ paths: content: application/json: schema: - type: object - required: - - bwInfo - properties: - bwInfo: - $ref: "#/components/schemas/BwInfo" + $ref: "#/components/schemas/BwInfo" 400: $ref: "#/components/responses/400" 403: @@ -161,10 +137,7 @@ paths: content: application/json: schema: - type: object - properties: - bwInfoDeltas: - $ref: '#/components/schemas/BwInfoDeltas' + $ref: '#/components/schemas/BwInfoDeltas' parameters: - $ref: '#/components/parameters/Path.allocationId' responses: @@ -173,12 +146,7 @@ paths: content: application/json: schema: - type: object - required: - - bwInfo - properties: - bwInfo: - $ref: "#/components/schemas/BwInfo" + $ref: "#/components/schemas/BwInfo" 400: $ref: "#/components/responses/400" 403: @@ -209,42 +177,28 @@ components: 400: description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' content: - application/json: + application/problem+json: schema: - type: object - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' 403: description: 'Forbidden : operation is not allowed given the current status of the resource.' content: - application/json: + application/problem+json: schema: - type: object - required: - - problemDetails - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' 404: description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' content: - application/json: + application/problem+json: schema: - type: object - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' 412: description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT' content: - application/json: + application/problem+json: schema: - type: object - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' parameters: Path.allocationId: name: allocationId diff --git a/TrafficSteeringApi.json b/TrafficSteeringApi.json index ec16069..6277b64 100644 --- a/TrafficSteeringApi.json +++ b/TrafficSteeringApi.json @@ -42,12 +42,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mtsCapabilityInfo": { - "$ref": "#/components/schemas/MtsCapabilityInfo" - } - } + "$ref": "#/components/schemas/MtsCapabilityInfo" } } } @@ -89,14 +84,9 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mtsSessionInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } + "type": "array", + "items": { + "$ref": "#/components/schemas/MtsSessionInfo" } } } @@ -127,12 +117,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "MtsSessionInfo": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } + "$ref": "#/components/schemas/MtsSessionInfo" } } } @@ -143,12 +128,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mtsSessionInfo": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } + "$ref": "#/components/schemas/MtsSessionInfo" } } } @@ -184,12 +164,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mtsSessionInfo": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } + "$ref": "#/components/schemas/MtsSessionInfo" } } } @@ -223,12 +198,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mtsSessionInfo": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } + "$ref": "#/components/schemas/MtsSessionInfo" } } } @@ -239,12 +209,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "mtsSessionInfo": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } + "$ref": "#/components/schemas/MtsSessionInfo" } } } @@ -297,14 +262,9 @@ "400": { "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } @@ -312,17 +272,9 @@ "403": { "description": "Forbidden : operation is not allowed given the current status of the resource.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "required": [ - "problemDetails" - ], - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } @@ -330,14 +282,9 @@ "404": { "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } @@ -345,14 +292,9 @@ "412": { "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "problemDetails": { - "$ref": "#/components/schemas/ProblemDetails" - } - } + "$ref": "#/components/schemas/ProblemDetails" } } } diff --git a/TrafficSteeringApi.yaml b/TrafficSteeringApi.yaml index bab7001..6f3ea96 100644 --- a/TrafficSteeringApi.yaml +++ b/TrafficSteeringApi.yaml @@ -34,10 +34,7 @@ paths: content: application/json: schema: - type: object - properties: - mtsCapabilityInfo: - $ref: "#/components/schemas/MtsCapabilityInfo" + $ref: "#/components/schemas/MtsCapabilityInfo" 400: $ref: "#/components/responses/400" 403: @@ -61,12 +58,9 @@ paths: content: application/json: schema: - type: object - properties: - mtsSessionInfo: - type: array - items: - $ref: "#/components/schemas/MtsSessionInfo" + type: array + items: + $ref: "#/components/schemas/MtsSessionInfo" 400: $ref: "#/components/responses/400" 403: @@ -86,20 +80,14 @@ paths: content: application/json: schema: - type: object - properties: - MtsSessionInfo: - $ref: '#/components/schemas/MtsSessionInfo' + $ref: '#/components/schemas/MtsSessionInfo' responses: 201: description: "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource." content: application/json: schema: - type: object - properties: - mtsSessionInfo: - $ref: "#/components/schemas/MtsSessionInfo" + $ref: "#/components/schemas/MtsSessionInfo" 400: $ref: "#/components/responses/400" 403: @@ -121,10 +109,7 @@ paths: content: application/json: schema: - type: object - properties: - mtsSessionInfo: - $ref: "#/components/schemas/MtsSessionInfo" + $ref: "#/components/schemas/MtsSessionInfo" 400: $ref: "#/components/responses/400" 403: @@ -145,20 +130,14 @@ paths: content: application/json: schema: - type: object - properties: - mtsSessionInfo: - $ref: '#/components/schemas/MtsSessionInfo' + $ref: '#/components/schemas/MtsSessionInfo' responses: 200: description: "Used to indicate nonspecific success. The response body contains a representation of the resource." content: application/json: schema: - type: object - properties: - mtsSessionInfo: - $ref: "#/components/schemas/MtsSessionInfo" + $ref: "#/components/schemas/MtsSessionInfo" 400: $ref: "#/components/responses/400" 403: @@ -189,42 +168,28 @@ components: 400: description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' content: - application/json: + application/problem+json: schema: - type: object - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' 403: description: 'Forbidden : operation is not allowed given the current status of the resource.' content: - application/json: + application/problem+json: schema: - type: object - required: - - problemDetails - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' 404: description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' content: - application/json: + application/problem+json: schema: - type: object - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' 412: description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT' content: - application/json: + application/problem+json: schema: - type: object - properties: - problemDetails: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/ProblemDetails' parameters: Path.sessionId: name: sessionId -- GitLab