Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stoplight/styleguide.json

Large diffs are not rendered by default.

147 changes: 80 additions & 67 deletions ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,17 @@ paths:

All values in the subscription (except: `callbackUrl` and `secret`) will be used as filters when sending notifications. All specified filters must be met in order for a notification to be sent. A logical **AND** is used between filters. So specifying

carrierServiceCodes = 'FE1'
carrierServiceCode = 'FE1' //in a carrierService object
AND
vesselIMONumbers = '12345678'

means that the notifications sent for this subscription **MUST** be for service `FE1` (*carrierServiceCode='FE1'*) **and** vessel IMO `12345678` (*vesselIMONumber='12345678'*). If all filters are not fulfilled - then the notification will not be sent.
means that the notifications sent for this subscription **MUST** be for service `FE1` (*carrierServiceCode='FE1'* inside a *carrierService* object) **and** vessel IMO `12345678` (*vesselIMONumber='12345678'*). If all filters are not fulfilled - then the notification will not be sent.

Filters that are specified as lists use logical **OR** between list values. So

carrierServiceCodes = ['FE1','DR02']
carrierServices = [{carrierServiceCode: 'FE1'},{carrierServiceCode: 'DR02', carrierSMDGCode: 'YML'}]

means that notifications sent will match **either** `FE1` **OR** `DR02` carrierServiceCodes.
means that notifications sent will match **either** `FE1` carrierServiceCode (from any carrier) **OR** `DR02` carrierServiceCode (belonging to YML).
Comment thread
HenrikHL marked this conversation as resolved.
required: true
content:
application/json:
Expand Down Expand Up @@ -280,25 +280,26 @@ paths:
summary: |
Subscription using emails to be notified about Service changes
description: |
A subscription setup using the email channel to be notified about changes to `carrierServiceCodes`: FE1 and DR001.
A subscription setup using the email channel to be notified about changes to "**carrierServiceCodes**": `FE1` belonging to `YML` and `DR001`.
value:
notificationChannel:
useEmail: true
carrierServiceCodes:
- FE1
- DR001
carrierServices:
- carrierServiceCode: FE1
carrierSMDGCode: YML
- carrierServiceCode: DR001
weekRange: 3
inactiveEmailServiceExample:
summary: |
A disabled subscription using emails to be notified about Service changes.
description: |
A subscription setup using the email channel to be notified about changes to `carrierServiceCodes`: FE1 and DR001. The subscription is inactive and no emails will be sent as the `useEmail` is set to false.
A subscription setup using the email channel to be notified about changes to "**carrierServiceCodes**": `FE1` and `DR001` (from any carrier). The subscription is inactive and no emails will be sent as the `useEmail` is set to false.
value:
notificationChannel:
useEmail: false
carrierServiceCodes:
- FE1
- DR001
carrierServices:
- carrierServiceCode: FE1
- carrierServiceCode: DR001
weekRange: 3
responses:
'201':
Expand Down Expand Up @@ -647,7 +648,7 @@ components:
type: object
title: Subscription
description: |
...
Subscription containing all information (notificationChannel, filters, range, etc) except the `secret`.
properties:
subscriptionReference:
type: string
Expand Down Expand Up @@ -685,22 +686,40 @@ components:
description: |
Number of weeks into the future for which this subscription will send notifications. If the number is `4` it means that any changes further in the future than 4 weeks from now will **not** be sent.
example: 4
carrierServiceCodes:
carrierServices:
type: array
description: |
An array of **carrier-specific codes** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the values when matching.
An array of **carrierServiceCode and an optional carrierSMDGCode** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the objects when matching.

If this property is empty, you will be notified for all `carrierServiceCodes` that have changes you are authorized to see.
If this property is omitted, you will be notified for all `services` that have changes you are authorized to see.
items:
type: string
pattern: ^\S(?:.*\S)?$
maxLength: 11
type: object
description: |
The carrier-specific code of the service for which the schedule details are published.
example: FE1
It is possible to provide the `carrierServiceCode` with an optional `carrierSMDGCode` (to uniquely identify the `carrierServiceCode`) when specifying the Service.

If multiple `carrierServiceCode` with optional `carrierSMDGCode` values need to be provided, then they must be specified as separate objects in the `carrierServices` array.
properties:
carrierServiceCode:
type: string
pattern: ^\S(?:.*\S)?$
maxLength: 11
description: |
The carrier-specific code of the service for which the schedule details are published.
example: FE1
carrierSMDGCode:
type: string
maxLength: 10
description: |
The carrier code based on SMDG Liner Code List.
example: MSK
required:
- carrierServiceCode
example:
- FE1
- DR01
- carrierServiceCode: AS1
carrierSMDGCode: HMM
- carrierServiceCode: AS1
carrierSMDGCode: YML
- carrierServiceCode: FE1
universalServiceReferences:
type: array
description: |
Expand All @@ -717,21 +736,6 @@ components:
- SR12345A
- SR33322T
- SR03732R
carrierSMDGCodes:
type: array
description: |
An array of **carrier SMDG codes** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the values when matching.

If this property is empty, you will be notified for all `carrierSMDGCodes` that have changes you are authorized to see.
items:
type: string
maxLength: 10
description: |
The carrier code based on SMDG Liner Code List.
example: MSK
example:
- MSK
- EMC
vesselNames:
type: array
description: |
Expand Down Expand Up @@ -834,9 +838,12 @@ components:
required:
- UNLocationCode
example:
- UNLocationCode: NLAMS
facilitySMDGCode: APMT
- UNLocationCode: DEHAM
UNLocationCode: NLAMS
facilitySMDGCode: APMT
example:
- UNLocationCode: NLAMS
facilitySMDGCode: APMT
- UNLocationCode: DEHAM
required:
- subscriptionReference
- notificationChannel
Expand All @@ -846,7 +853,7 @@ components:
type: object
title: Subscription with Secret
description: |
...
Subscription containing all information needed in order to create a subscription: notificationChannel, filters, range, etc
properties:
notificationChannel:
type: object
Expand Down Expand Up @@ -888,22 +895,43 @@ components:
description: |
Number of weeks into the future for which this subscription will send notifications. If the number is `4` it means that any changes further in the future than 4 weeks from now will **not** be sent.
example: 4
carrierServiceCodes:
carrierServices:
type: array
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
description: |
An array of **carrier-specific codes** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the values when matching.
An array of **carrierServiceCode and an optional carrierSMDGCode** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the objects when matching.

If this property is empty, you will be notified for all `carrierServiceCodes` that have changes you are authorized to see.
If this property is omitted, you will be notified for all `services` that have changes you are authorized to see.
items:
type: string
pattern: ^\S(?:.*\S)?$
maxLength: 11
type: object
description: |
The carrier-specific code of the service for which the schedule details are published.
example: FE1
It is possible to provide the `carrierServiceCode` with an optional `carrierSMDGCode` (to uniquely identify the `carrierServiceCode`) when specifying the Service.

If multiple `carrierServiceCode` with optional `carrierSMDGCode` values need to be provided, then they must be specified as separate objects in the `carrierServices` array.
properties:
carrierServiceCode:
type: string
pattern: ^\S(?:.*\S)?$
maxLength: 11
description: |
The carrier-specific code of the service for which the schedule details are published.
example: FE1
carrierSMDGCode:
type: string
maxLength: 10
description: |
The carrier code based on SMDG Liner Code List.
example: MSK
required:
- carrierServiceCode
example:
carrierServiceCode: AS1
carrierSMDGCode: HMM
example:
- FE1
- DR01
- carrierServiceCode: AS1
carrierSMDGCode: HMM
- carrierServiceCode: AS1
carrierSMDGCode: YML
- carrierServiceCode: FE1
universalServiceReferences:
type: array
description: |
Expand All @@ -920,21 +948,6 @@ components:
- SR12345A
- SR33322T
- SR03732R
carrierSMDGCodes:
type: array
description: |
An array of **carrier SMDG codes** to match with this subscription filter. If the array consists of more than one item - a logical **OR** is used between the values when matching.

If this property is empty, you will be notified for all `carrierSMDGCodes` that have changes you are authorized to see.
items:
type: string
maxLength: 10
description: |
The carrier code based on SMDG Liner Code List.
example: MSK
example:
- MSK
- EMC
vesselNames:
type: array
description: |
Expand Down
Loading