From 4c12a5c5d3f45542d853f925c55497e30a562783 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Wed, 17 Apr 2024 11:49:34 +0100 Subject: [PATCH 1/3] Update simple_edge_discovery.yaml Changed basepath version to /v1 Changed API version number to 1.0.0 --- code/API_definitions/Discovery/simple_edge_discovery.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/API_definitions/Discovery/simple_edge_discovery.yaml b/code/API_definitions/Discovery/simple_edge_discovery.yaml index 51f6883f..cff82c9c 100644 --- a/code/API_definitions/Discovery/simple_edge_discovery.yaml +++ b/code/API_definitions/Discovery/simple_edge_discovery.yaml @@ -2,7 +2,7 @@ openapi: 3.0.3 info: title: Simple Edge Discovery API - version: 0.9.4-rc.1 + version: 1.0.0 description: | # Find the closest Edge Cloud Zone --- @@ -149,8 +149,7 @@ info: CAMARA guidelines defines a set of authorization flows which can grant API clients access to the API functionality, as outlined in the document - [CAMARA-API-access-and-user-consent.md] - (https://github.com/camaraproject/IdentityAndConsentManagement/blob/main/documentation/CAMARA-API-access-and-user-consent.md). + [CAMARA-API-access-and-user-consent.md](https://github.com/camaraproject/IdentityAndConsentManagement/blob/main/documentation/CAMARA-API-access-and-user-consent.md). Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the Telco Operator exposing the API, taking into account the declared purpose for accessing @@ -183,7 +182,7 @@ servers: default: https://localhost:443 description: API root. basePath: - default: simple-edge-discovery/v0 + default: simple-edge-discovery/v1 description: Base path for the Simple Edge Discovery API. tags: From 7e3fab1e5ecf3ac8bd94cb007ca504283dec2933 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Mon, 22 Apr 2024 17:02:22 +0100 Subject: [PATCH 2/3] add X-Correlator to simple_edge_discovery.yaml Adds X-Correlator (fix to issue 202, wrongly omitted from previous commit) --- .../Discovery/simple_edge_discovery.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/code/API_definitions/Discovery/simple_edge_discovery.yaml b/code/API_definitions/Discovery/simple_edge_discovery.yaml index cff82c9c..dd4660c8 100644 --- a/code/API_definitions/Discovery/simple_edge_discovery.yaml +++ b/code/API_definitions/Discovery/simple_edge_discovery.yaml @@ -245,6 +245,19 @@ paths: prefixed with '+'. schema: $ref: "#/components/schemas/PhoneNumber" + + - name: X-Correlator + in: header + required: false + description: | + When the API Consumer includes the "X-Correlator" header in the + request, the API provider must include it in the response with + the same value that was used in the request. Otherwise, it is + optional to include the "X-Correlator" header in the response with + any valid value. Recommendation is to use UUID for values. + schema: + type: string + format: uuid responses: "200": @@ -293,6 +306,19 @@ components: description: OpenID Provider Configuration Information. type: openIdConnect openIdConnectUrl: .well-known/openid-configuration + + headers: + X-Correlator: + description: | + When the API Consumer includes the "X-Correlator" header in the request, + the API provider must include it in the response with the same value t + hat was used in the request. Otherwise, it is optional to include the + "X-Correlator" header in the response with any valid value. + Recommendation is to use UUID for values. + required: false + schema: + type: string + format: uuid schemas: EdgeCloudZones: @@ -387,6 +413,9 @@ components: responses: 400BadRequest: description: Bad Request + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -433,6 +462,9 @@ components: } 401Unauthorized: description: Unauthorized + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -449,6 +481,9 @@ components: 403Forbidden: description: Forbidden + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -465,6 +500,9 @@ components: 404NotFound: description: Subscriber Not Found + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -483,6 +521,9 @@ components: 405MethodNotAllowed: description: Method Not Allowed + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -502,6 +543,9 @@ components: 406Unacceptable: description: Not Acceptable + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -519,6 +563,9 @@ components: 429TooManyRequests: description: Too Many Requests + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -538,6 +585,9 @@ components: 500InternalServerError: description: Internal Server Error + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -551,6 +601,9 @@ components: 502BadGateway: description: Bad Gateway + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -564,6 +617,9 @@ components: 503ServiceUnavailable: description: Service Unavailable + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: @@ -577,6 +633,9 @@ components: 504GatewayTimeout: description: Gateway Time-Out + headers: + X-Correlator: + $ref: "#/components/headers/X-Correlator" content: application/json: schema: From ed32560de80e55943d67766a040962df54d5498b Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Tue, 30 Apr 2024 15:32:22 +0100 Subject: [PATCH 3/3] corrected scope to align with Commonalities Per [this post](https://github.com/camaraproject/EdgeCloud/pull/228#pullrequestreview-2024616806) in the Conversation for PR #228 --- code/API_definitions/Discovery/simple_edge_discovery.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/API_definitions/Discovery/simple_edge_discovery.yaml b/code/API_definitions/Discovery/simple_edge_discovery.yaml index dd4660c8..c6537087 100644 --- a/code/API_definitions/Discovery/simple_edge_discovery.yaml +++ b/code/API_definitions/Discovery/simple_edge_discovery.yaml @@ -195,7 +195,7 @@ paths: get: security: - openId: - - simple-edge-discovery-read-closest + - simple-edge-discovery:edge-cloud-zones:read operationId: getEdgeCloudZones parameters: - name: filter