OVPAY-973 - Added HATEOAS, pagination and reference API's.

This commit is contained in:
Bas Boterman 2025-09-10 17:37:29 +02:00
parent e4472a2ae7
commit f4bbb0d2e2

View File

@ -8,8 +8,7 @@ servers:
paths:
/notificationsubscriptions:
get:
summary: Get all notification subscriptions
operationId: getAllNotificationSubscriptions
summary: Find one or more notification subscriptions
tags:
- Notification Subscriptions
parameters:
@ -116,6 +115,7 @@ paths:
emptyNotificationSubscriptionResponse:
value:
notificationSubscriptions: []
href: null
minimalNotificationSubscriptionResponse:
value:
notificationSubscriptions:
@ -140,6 +140,13 @@ paths:
createdAt: '2025-10-01T12:00:00Z'
createdBy: system
isActive: true
_links:
edit:
href: /notificationsubscriptions/5bedce29-af0c-4f3c-b182-2caa8a1f9377
method: PATCH
delete:
href: /notificationsubscriptions/5bedce29-af0c-4f3c-b182-2caa8a1f9377
method: DELETE
- notificationSubscriptionId: 39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
eventTypeChannel:
eventTypeChannelId: c4729ad4-46ef-4329-94f9-5079be21dfc5
@ -161,6 +168,14 @@ paths:
createdAt: '2025-09-15T08:30:00Z'
createdBy: system
isActive: false
_links:
edit:
href: /notificationsubscriptions/39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
method: PATCH
delete:
href: /notificationsubscriptions/39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
method: DELETE
href: null
fullNotificationSubscriptionResponse:
value:
notificationSubscriptions:
@ -190,6 +205,13 @@ paths:
updatedAt: '2025-10-02T12:00:00Z'
updatedBy: user
isActive: true
_links:
edit:
href: /notificationsubscriptions/5bedce29-af0c-4f3c-b182-2caa8a1f9377
method: PATCH
delete:
href: /notificationsubscriptions/5bedce29-af0c-4f3c-b182-2caa8a1f9377
method: DELETE
- notificationSubscriptionId: 39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
eventTypeChannel:
eventTypeChannelId: c4729ad4-46ef-4329-94f9-5079be21dfc5
@ -216,6 +238,14 @@ paths:
updatedAt: '2025-09-16T09:45:00Z'
updatedBy: user
isActive: false
_links:
edit:
href: /notificationsubscriptions/39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
method: PATCH
delete:
href: /notificationsubscriptions/39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd
method: DELETE
href: null
'400':
description: Bad request
content:
@ -246,7 +276,6 @@ paths:
$ref: '#/components/schemas/500Response'
post:
summary: Create a new notification subscription
operationId: createNotificationSubscription
tags:
- Notification Subscriptions
requestBody:
@ -472,7 +501,6 @@ paths:
$ref: '#/components/schemas/500Response'
delete:
summary: Delete a notification subscription by ID
operationId: deleteNotificationSubscription
tags:
- Notification Subscriptions
parameters:
@ -514,6 +542,388 @@ paths:
schema:
type: object
$ref: '#/components/schemas/500Response'
/eventorigins:
get:
summary: Get all event origins
tags:
- References
responses:
'200':
description: A list of event origins
content:
application/json:
schema:
$ref: '#/components/schemas/GetEventOriginsResponse'
examples:
eventOriginsResponse:
value:
eventOrigins:
- eventOriginId: 1
name: GBO
description: Events originated at GBO
- eventOriginId: 2
name: Website
description: Events originated at the website
- eventOriginId: 3
name: Payt
description: Events originated at Payt
- eventOriginId: 4
name: Twikey
description: Events originated at Twikey
- eventOriginId: 5
name: TapConnect
description: Events originated at TapConnect
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
/channels:
get:
summary: Get all channels
tags:
- References
responses:
'200':
description: A list of channels
content:
application/json:
schema:
$ref: '#/components/schemas/GetChannelsResponse'
examples:
channelsResponse:
value:
channels:
- channelId: 1
name: push
- channelId: 2
name: email
- channelId: 3
name: sms
- channelId: 4
name: mail
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
/notificationcategories:
get:
summary: Get all notification categories
tags:
- References
responses:
'200':
description: A list of notification categories
content:
application/json:
schema:
$ref: '#/components/schemas/GetNotificationCategoriesResponse'
examples:
notificationCategoriesResponse:
value:
notificationCategories:
- notifcationCategoryId: 1
name: Mijn Reizen
- notifcationCategoryId: 2
name: Mijn Passen
- notifcationCategoryId: 3
name: Service Alerts
- notifcationCategoryId: 4
name: Service Berichten
- notifcationCategoryId: 5
name: Mijn Betalingen
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
/eventtypes:
get:
summary: Get all event types
tags:
- References
responses:
'200':
description: A list of event types
content:
application/json:
schema:
$ref: '#/components/schemas/GetEventTypesResponse'
examples:
eventTypesResponse:
value:
eventTypes:
- eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
- eventTypeId: 16
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKI
prettyName: Checkin gemist
optInRequired: true
- eventTypeId: 25
eventOrigin:
eventOriginId: 3
name: Payt
description: Events originated at Payt
name: Payment
subname: Failed Payment
prettyName: Betaling mislukt
optInRequired: false
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
/eventtypecategories:
get:
summary: Get all event type categories
tags:
- References
responses:
'200':
description: A list of event type categories
content:
application/json:
schema:
$ref: '#/components/schemas/GetEventTypeCategoriesResponse'
examples:
eventTypeCategoriesResponse:
value:
eventTypeCategories:
- eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
notificationCategory:
notifcationCategoryId: 1
name: Mijn Reizen
- eventType:
eventTypeId: 16
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKI
prettyName: Checkin gemist
optInRequired: true
notificationCategory:
notifcationCategoryId: 1
name: Mijn Reizen
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
/eventtypechannels:
get:
summary: Get all event type channels
tags:
- References
responses:
'200':
description: A list of event type channels
content:
application/json:
schema:
$ref: '#/components/schemas/GetEventTypeChannelResponse'
examples:
eventTypeChannelsResponse:
value:
eventTypeChannels:
- eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f
eventType:
eventTypeId: 15
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKO
prettyName: Checkout gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
- eventTypeChannelId: c4729ad4-46ef-4329-94f9-5079be21dfc5
eventType:
eventTypeId: 16
eventOrigin:
eventOriginId: 1
name: GBO
description: Events originated at GBO
name: Travel
subname: Missing CKI
prettyName: Checkin gemist
optInRequired: true
channel:
channelId: 1
name: push
isDefault: true
isMandatory: false
'400':
description: Bad request
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/400Response'
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/401Response'
'404':
description: Not found
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/404Response'
'500':
description: Internal server error
content:
application/json:
schema:
type: object
$ref: '#/components/schemas/500Response'
components:
schemas:
GetNotificationSubscriptionsResponse:
@ -523,8 +933,11 @@ components:
type: array
items:
$ref: '#/components/schemas/NotificationSubscription'
href:
type: string
required:
- notificationSubscriptions
- href
NotificationSubscription:
type: object
properties:
@ -615,6 +1028,53 @@ components:
example: false
PatchNotificationSubscriptionResponse:
$ref: '#/components/schemas/NotificationSubscription'
GetEventOriginsResponse:
type: object
properties:
eventOrigins:
type: array
items:
$ref: '#/components/schemas/EventOrigin'
GetChannelsResponse:
type: object
properties:
channels:
type: array
items:
$ref: '#/components/schemas/Channel'
GetNotificationCategoriesResponse:
type: object
properties:
notificationCategories:
type: array
items:
$ref: '#/components/schemas/NotificationCategory'
GetEventTypesResponse:
type: object
properties:
eventTypes:
type: array
items:
$ref: '#/components/schemas/EventType'
GetEventTypeCategoriesResponse:
type: object
properties:
eventTypeCategories:
type: array
items:
type: object
properties:
eventType:
$ref: '#/components/schemas/EventType'
notificationCategory:
$ref: '#/components/schemas/NotificationCategory'
GetEventTypeChannelResponse:
type: object
properties:
eventTypeChannels:
type: array
items:
$ref: '#/components/schemas/EventTypeChannel'
EventTypeChannel:
type: object
properties:
@ -691,6 +1151,18 @@ components:
required:
- channelId
- name
NotificationCategory:
type: object
properties:
notifcationCategoryId:
type: integer
example: 1
name:
type: string
example: Mijn Reizen
required:
- notifcationCategoryId
- name
400Response:
type: object
properties: