From eb750b651b9d0eaab181b39c8b40c50733a77fbe Mon Sep 17 00:00:00 2001 From: Rafal Artych <121048129+rartych@users.noreply.github.com> Date: Wed, 29 May 2024 16:24:53 +0200 Subject: [PATCH] Update sim-swap-notification-subscription.yaml --- .../sim-swap-notification-subscription.yaml | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/code/API_definitions/sim-swap-notification-subscription.yaml b/code/API_definitions/sim-swap-notification-subscription.yaml index 13809bb..cac3150 100644 --- a/code/API_definitions/sim-swap-notification-subscription.yaml +++ b/code/API_definitions/sim-swap-notification-subscription.yaml @@ -30,10 +30,10 @@ info: - ``org.camaraproject.sim-swap.v0.swapped`` - Event triggered when a sim swap occurs on the associated phoneNumber - Note: Additionally to these list, ``org.camaraproject.sim-swap.v0.subscription-ends`` notification `type` is sent when the subscription ends. - This notification does not require dedicated subscription. + Note: Additionally to these list, ``org.camaraproject.sim-swap.v0.subscription-ends`` notification `type` is sent when the subscription ends. + This notification does not require dedicated subscription. It is used when: - - the subscription expire time (optionally set by the requester) has been reached + - the subscription expire time (optionally set by the requester) has been reached - the maximum number of subscription events (optionally set by the requester) has been reached - the API server has to stop sending notification prematurely @@ -42,7 +42,7 @@ info: This endpoint describes the event notification received on subscription listener side when the event occurred. As for subscription, detailed description of the event notification is provided in the CAMARA API design guideline document. **WARNING**: This callback endpoint must be exposed on the listener side as `POST /{$request.body#/webhook/notificationUrl}` - will be posted by the sim swap resource server to the webhook url provided by notification + will be posted by the sim swap resource server to the webhook url provided by notification listener. # Authorization and authentication @@ -87,7 +87,7 @@ paths: - $ref: '#/components/parameters/x-correlator' security: - openId: - - sim-swap:subscriptions:create + - sim-swap:subscriptions:create requestBody: content: application/json: @@ -117,7 +117,7 @@ paths: SWAPPED: $ref: '#/components/examples/SWAPPED' SUBSCRIPTION_ENDS: - $ref: '#/components/examples/SUBSCRIPTION_ENDS' + $ref: '#/components/examples/SUBSCRIPTION_ENDS' responses: "204": description: Successful notification @@ -135,8 +135,8 @@ paths: "503": $ref: "#/components/responses/Generic503" security: - - { } - - notificationsBearerAuth: [ ] + - {} + - notificationsBearerAuth: [] responses: "201": @@ -179,7 +179,7 @@ paths: - $ref: '#/components/parameters/x-correlator' security: - openId: - - sim-swap:subscriptions:read + - sim-swap:subscriptions:read responses: "200": description: List of event subscription details @@ -211,7 +211,7 @@ paths: operationId: retrieveSubscription security: - openId: - - sim-swap:subscriptions:read + - sim-swap:subscriptions:read parameters: - $ref: "#/components/parameters/SubscriptionId" - $ref: '#/components/parameters/x-correlator' @@ -245,7 +245,7 @@ paths: description: delete a given event subscription. security: - openId: - - sim-swap:subscriptions:delete + - sim-swap:subscriptions:delete parameters: - $ref: "#/components/parameters/SubscriptionId" - $ref: '#/components/parameters/x-correlator' @@ -323,7 +323,7 @@ components: message: type: string description: Detailed error description - + CreateSubscription: description: The request for creating a sim swap event subscription type: object @@ -439,8 +439,8 @@ components: description: Response for a sim swap operation managed asynchronously (Creation or Deletion) type: object properties: - subscriptionId: - $ref: '#/components/schemas/SubscriptionId' + subscriptionId: + $ref: '#/components/schemas/SubscriptionId' SubscriptionId: type: string @@ -479,8 +479,8 @@ components: discriminator: propertyName: 'type' mapping: - org.camaraproject.sim-swap.v0.swapped: '#/components/schemas/EventSimSwap' - org.camaraproject.sim-swap.v0.subscription-ends: '#/components/schemas/EventSubscriptionEnds' + org.camaraproject.sim-swap.v0.swapped: '#/components/schemas/EventSimSwap' + org.camaraproject.sim-swap.v0.subscription-ends: '#/components/schemas/EventSubscriptionEnds' Source: type: string @@ -505,7 +505,7 @@ components: example: '2018-04-05T17:31:00Z' EventSimSwap: - description: event structure for swapped event + description: event structure for swapped event allOf: - $ref: '#/components/schemas/CloudEvent' - type: object @@ -514,7 +514,7 @@ components: $ref: '#/components/schemas/Swapped' EventSubscriptionEnds: - description: event structure for event subscription ends + description: event structure for event subscription ends allOf: - $ref: '#/components/schemas/CloudEvent' - type: object @@ -524,7 +524,7 @@ components: Swapped: description: Event detail structure for ROAMING_ON & ROAMING_OFF event - type : object + type: object required: - phoneNumber - subscriptionId @@ -536,7 +536,7 @@ components: SubscriptionEnds: description: Event detail structure for SUBSCRIPTION_ENDS event - type : object + type: object required: - phoneNumber - terminationReason @@ -686,9 +686,9 @@ components: type: org.camaraproject.sim-swap.v0.swapped specversion: "1.0" datacontenttype: application/json - data: - phoneNumber: +123456788 - subscriptionId: 2ghy-55gg-7iup-yuo9 + data: + phoneNumber: +123456788 + subscriptionId: 2ghy-55gg-7iup-yuo9 time: 2023-01-18T13:18:23.682Z SUBSCRIPTION_ENDS: @@ -698,9 +698,9 @@ components: type: org.camaraproject.sim-swap.v0.subscription-ends specversion: "1.0" datacontenttype: application/json - data: - phoneNumber: +123456789 - terminationReason: SUBSCRIPTION_EXPIRED - subscriptionId: 2ghy-55gg-7iup-yuo9 - terminationDescription: subscription expire time reached + data: + phoneNumber: +123456789 + terminationReason: SUBSCRIPTION_EXPIRED + subscriptionId: 2ghy-55gg-7iup-yuo9 + terminationDescription: subscription expire time reached time: 2023-01-19T13:18:23.682Z