Skip to content

Commit

Permalink
Update sim-swap-notification-subscription.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rartych authored May 29, 2024
1 parent 84c72d4 commit eb750b6
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions code/API_definitions/sim-swap-notification-subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -87,7 +87,7 @@ paths:
- $ref: '#/components/parameters/x-correlator'
security:
- openId:
- sim-swap:subscriptions:create
- sim-swap:subscriptions:create
requestBody:
content:
application/json:
Expand Down Expand Up @@ -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
Expand All @@ -135,8 +135,8 @@ paths:
"503":
$ref: "#/components/responses/Generic503"
security:
- { }
- notificationsBearerAuth: [ ]
- {}
- notificationsBearerAuth: []

responses:
"201":
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -524,7 +524,7 @@ components:

Swapped:
description: Event detail structure for ROAMING_ON & ROAMING_OFF event
type : object
type: object
required:
- phoneNumber
- subscriptionId
Expand All @@ -536,7 +536,7 @@ components:

SubscriptionEnds:
description: Event detail structure for SUBSCRIPTION_ENDS event
type : object
type: object
required:
- phoneNumber
- terminationReason
Expand Down Expand Up @@ -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:
Expand All @@ -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

0 comments on commit eb750b6

Please sign in to comment.