From d7609d101c42a2213b3c770cfb63482752c2477b Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:20:21 +0200 Subject: [PATCH 1/3] Reset YAML files back to wip Intentionally not touched the .feature files --- code/API_definitions/sim-swap-subscriptions.yaml | 4 ++-- code/API_definitions/sim-swap.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/API_definitions/sim-swap-subscriptions.yaml b/code/API_definitions/sim-swap-subscriptions.yaml index 090e745..c360f27 100644 --- a/code/API_definitions/sim-swap-subscriptions.yaml +++ b/code/API_definitions/sim-swap-subscriptions.yaml @@ -96,14 +96,14 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 0.3.0-rc.1 + version: wip x-camara-commonalities: 0.6 externalDocs: description: Product documentation at CAMARA url: https://github.com/camaraproject/ servers: - - url: '{apiRoot}/sim-swap-subscriptions/v0.3-rc1' + - url: '{apiRoot}/sim-swap-subscriptions/vwip' variables: apiRoot: default: http://localhost:9091 diff --git a/code/API_definitions/sim-swap.yaml b/code/API_definitions/sim-swap.yaml index 5d3bbe3..91f46cb 100644 --- a/code/API_definitions/sim-swap.yaml +++ b/code/API_definitions/sim-swap.yaml @@ -77,13 +77,13 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 2.1.0-rc.2 + version: wip x-camara-commonalities: 0.6 externalDocs: description: Product documentation at Camara url: https://github.com/camaraproject/SimSwap servers: - - url: "{apiRoot}/sim-swap/v2rc2" + - url: "{apiRoot}/sim-swap/vwip" variables: apiRoot: default: http://localhost:9091 From c6e01ee4269a9624ad71ecc28049a165c1cd2b81 Mon Sep 17 00:00:00 2001 From: Fernando Prado Date: Tue, 19 Aug 2025 14:11:39 +0200 Subject: [PATCH 2/3] align with commonalities --- .../sim-swap-subscriptions.yaml | 28 +++++++++++-------- code/API_definitions/sim-swap.yaml | 12 ++++---- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/code/API_definitions/sim-swap-subscriptions.yaml b/code/API_definitions/sim-swap-subscriptions.yaml index c360f27..6af2c4c 100644 --- a/code/API_definitions/sim-swap-subscriptions.yaml +++ b/code/API_definitions/sim-swap-subscriptions.yaml @@ -362,19 +362,19 @@ components: ErrorInfo: type: object required: + - message - status - code - - message properties: + message: + type: string + description: A human-readable description of what the event represents status: type: integer description: HTTP response status code code: type: string - description: Code given to this error - message: - type: string - description: Detailed error description + description: A human-readable code to describe the error SubscriptionRequest: description: The request for creating a sim swap event subscription @@ -444,7 +444,7 @@ components: type: string format: date-time example: 2025-01-17T13:18:23.682Z - description: The subscription expiration time (in date-time format) requested by the API consumer. Up to API project decision to keep it. + description: The subscription expiration time (in date-time format) requested by the API consumer. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. Up to API project decision to keep it. subscriptionMaxEvents: type: integer description: | @@ -499,7 +499,11 @@ components: accessTokenExpiresUtc: type: string format: date-time - description: REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. In the case of an ACCESS_TOKEN_EXPIRED termination reason, implementation should notify the client before the expiration date. + description: | + REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. + In the case of an ACCESS_TOKEN_EXPIRED termination reason, implementation should notify the client before the expiration date. + If the access token is a JWT and registered "exp" (Expiration Time) claim is present, the two expiry times should match. + It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. accessTokenType: description: REQUIRED. Type of the access token (See [OAuth 2.0](https://tools.ietf.org/html/rfc6749#section-7.1)). type: string @@ -522,7 +526,11 @@ components: accessTokenExpiresUtc: type: string format: date-time - description: REQUIRED. An absolute UTC instant at which the token shall be considered expired. + description: | + REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. + In the case of an ACCESS_TOKEN_EXPIRED termination reason, implementation should notify the client before the expiration date. + If the access token is a JWT and registered "exp" (Expiration Time) claim is present, the two expiry times should match. + It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. accessTokenType: description: REQUIRED. Type of the access token (See [OAuth 2.0](https://tools.ietf.org/html/rfc6749#section-7.1)). type: string @@ -609,7 +617,6 @@ components: description: | Date when the event subscription will begin/began It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. - Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z) type: string format: date-time example: "2023-07-03T12:27:08.312Z" @@ -619,7 +626,6 @@ components: description: | Date when the event subscription will expire. Only provided when `subscriptionExpireTime` is indicated by API client or Telco Operator has specific policy about that. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. - Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z) example: "2023-07-03T12:27:08.312Z" status: type: string @@ -716,7 +722,7 @@ components: DateTime: type: string format: date-time - description: Timestamp of when the occurrence happened. Must adhere to RFC 3339. + description: Timestamp of when the occurrence happened. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. example: "2018-04-05T17:31:00Z" EventSimSwap: diff --git a/code/API_definitions/sim-swap.yaml b/code/API_definitions/sim-swap.yaml index 91f46cb..441e9d1 100644 --- a/code/API_definitions/sim-swap.yaml +++ b/code/API_definitions/sim-swap.yaml @@ -225,7 +225,7 @@ components: latestSimChange: type: string format: date-time - description: Timestamp of latest SIM swap performed. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ (i.e. which allows 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z) + description: Timestamp of latest SIM swap performed. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone. nullable: true example: "2023-07-03T14:27:08.312+02:00" monitoredPeriod: @@ -249,19 +249,19 @@ components: ErrorInfo: type: object required: + - message - status - code - - message properties: + message: + type: string + description: A human-readable description of what the event represents status: type: integer description: HTTP response status code code: type: string - description: Code given to this error - message: - type: string - description: Detailed error description + description: A human-readable code to describe the error CreateCheckSimSwap: type: object properties: From 6b9579d27d13a0c761f9b4f6ee2d5ee8c7b919b5 Mon Sep 17 00:00:00 2001 From: Herbert Damker <52109189+hdamker@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:45:06 +0200 Subject: [PATCH 3/3] Revert ErrorInfo property order according to discussion in https://github.com/camaraproject/Commonalities/issues/515 and aligned with API Design Guide --- code/API_definitions/sim-swap-subscriptions.yaml | 9 ++++----- code/API_definitions/sim-swap.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/code/API_definitions/sim-swap-subscriptions.yaml b/code/API_definitions/sim-swap-subscriptions.yaml index 6af2c4c..dd362dc 100644 --- a/code/API_definitions/sim-swap-subscriptions.yaml +++ b/code/API_definitions/sim-swap-subscriptions.yaml @@ -362,20 +362,19 @@ components: ErrorInfo: type: object required: - - message - status - code + - message properties: - message: - type: string - description: A human-readable description of what the event represents status: type: integer description: HTTP response status code code: type: string description: A human-readable code to describe the error - + message: + type: string + description: A human-readable description of what the event represents SubscriptionRequest: description: The request for creating a sim swap event subscription type: object diff --git a/code/API_definitions/sim-swap.yaml b/code/API_definitions/sim-swap.yaml index 441e9d1..3f053d7 100644 --- a/code/API_definitions/sim-swap.yaml +++ b/code/API_definitions/sim-swap.yaml @@ -249,19 +249,19 @@ components: ErrorInfo: type: object required: - - message - status - code + - message properties: - message: - type: string - description: A human-readable description of what the event represents status: type: integer description: HTTP response status code code: type: string description: A human-readable code to describe the error + message: + type: string + description: A human-readable description of what the event represents CreateCheckSimSwap: type: object properties: