diff --git a/ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml b/ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml index 60b15f57..a94c6c28 100644 --- a/ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml +++ b/ovs_hub_ntf/v1/OVS_HUB_NTF_v1.0.0.yaml @@ -784,39 +784,48 @@ components: - '278111222' - '278173294' - '234422543' - UNLocationCodes: + locations: type: array + minItems: 1 description: | - An array of **UN Location 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 **UNLocationCode and/or facilitySMDGCode combinations** 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 `UNLocationCodes` that have changes you are authorized to see. + If this property is empty, you will be notified for all `locations` that have changes you are authorized to see. items: - type: string - pattern: ^[A-Z]{2}[A-Z2-9]{3}$ - minLength: 5 - maxLength: 5 + type: object description: | - The UN Location code specifying where the place is located. The pattern used must be + It is possible to provide the `UNLocationCode`, the `facilitySMDGCode` or both when specifying the location. - - 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en) - - 3 characters to code a location within that country. Letters A-Z and numbers from 2-9 can be used + If multiple `UNLocationCode` or `facilitySMDGCode` values need to be provided, then they must be specified as separate objects in the `locations` array. - More info can be found here: [UN/LOCODE](https://unece.org/trade/cefact/UNLOCODE-Download) - example: NLAMS - facilitySMDGCodes: - type: array - description: | - An array of **Facility 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. + **Condition:** At least one of `UNLocationCode` and/or `facilitySMDGCode` **MUST** be specified, both are also allowed. + properties: + UNLocationCode: + type: string + pattern: ^[A-Z]{2}[A-Z2-9]{3}$ + minLength: 5 + maxLength: 5 + description: | + The UN Location code specifying where the place is located. The pattern used must be - If this property is empty, you will be notified for all `facilitySMDGCodes` that have changes you are authorized to see. - items: - type: string - maxLength: 6 - description: | - The code used for identifying the specific facility. This code does not include the UN Location Code. + - 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en) + - 3 characters to code a location within that country. Letters A-Z and numbers from 2-9 can be used + + More info can be found here: [UN/LOCODE](https://unece.org/trade/cefact/UNLOCODE-Download) + example: NLAMS + facilitySMDGCode: + type: string + maxLength: 6 + description: | + The code used for identifying the specific facility. This code does not include the UN Location Code. - The codeList used by SMDG is the [SMDG Terminal Code List](https://smdg.org/wp-content/uploads/Codelists/Terminals/SMDG-Terminal-Code-List-v20210401.xlsx) - example: ACT + The codeList used by SMDG is the [SMDG Terminal Code List](https://smdg.org/wp-content/uploads/Codelists/Terminals/SMDG-Terminal-Code-List-v20210401.xlsx) + example: ACT + example: + - UNLocationCode: NLAMS + facilitySMDGCode: APMT + - UNLocationCode: DEHAM + - facilitySMDGCode: APMT required: - subscriptionReference - notificationChannel @@ -979,39 +988,47 @@ components: - '278111222' - '278173294' - '234422543' - UNLocationCodes: + locations: type: array description: | - An array of **UN Location 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 **UNLocationCode and/or facilitySMDGCode combinations** 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 `UNLocationCodes` that have changes you are authorized to see. + If this property is empty, you will be notified for all `locations` that have changes you are authorized to see. items: - type: string - pattern: ^[A-Z]{2}[A-Z2-9]{3}$ - minLength: 5 - maxLength: 5 + type: object description: | - The UN Location code specifying where the place is located. The pattern used must be + It is possible to provide the `UNLocationCode`, the `facilitySMDGCode` or both when specifying the location. - - 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en) - - 3 characters to code a location within that country. Letters A-Z and numbers from 2-9 can be used + If multiple `UNLocationCode` or `facilitySMDGCode` values need to be provided, then they must be specified as separate objects in the `locations` array. - More info can be found here: [UN/LOCODE](https://unece.org/trade/cefact/UNLOCODE-Download) - example: NLAMS - facilitySMDGCodes: - type: array - description: | - An array of **Facility 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. + **Condition:** At least one of `UNLocationCode` and/or `facilitySMDGCode` **MUST** be specified, both are also allowed. + properties: + UNLocationCode: + type: string + pattern: ^[A-Z]{2}[A-Z2-9]{3}$ + minLength: 5 + maxLength: 5 + description: | + The UN Location code specifying where the place is located. The pattern used must be - If this property is empty, you will be notified for all `facilitySMDGCodes` that have changes you are authorized to see. - items: - type: string - maxLength: 6 - description: | - The code used for identifying the specific facility. This code does not include the UN Location Code. + - 2 characters for the country code using [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en) + - 3 characters to code a location within that country. Letters A-Z and numbers from 2-9 can be used + + More info can be found here: [UN/LOCODE](https://unece.org/trade/cefact/UNLOCODE-Download) + example: NLAMS + facilitySMDGCode: + type: string + maxLength: 6 + description: | + The code used for identifying the specific facility. This code does not include the UN Location Code. - The codeList used by SMDG is the [SMDG Terminal Code List](https://smdg.org/wp-content/uploads/Codelists/Terminals/SMDG-Terminal-Code-List-v20210401.xlsx) - example: ACT + The codeList used by SMDG is the [SMDG Terminal Code List](https://smdg.org/wp-content/uploads/Codelists/Terminals/SMDG-Terminal-Code-List-v20210401.xlsx) + example: ACT + example: + - UNLocationCode: NLAMS + facilitySMDGCode: APMT + - UNLocationCode: DEHAM + - facilitySMDGCode: APMT required: - notificationChannel - weekRange