Skip to content

Commit

Permalink
fix(schema): update PostNL BE base schema validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
GravendeelJochem committed Dec 18, 2024
1 parent 065e50f commit 8a9a8e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 139 deletions.
141 changes: 3 additions & 138 deletions config/schema/belgie/order/postnl/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,6 @@
"description": "belgie/order/postnl/base",
"type": "object",
"allOf": [
{
"anyOf": [
{
"properties": {
"deliveryOptions": {
"properties": {
"shipmentOptions": {
"required": ["largeFormat"],
"properties": {
"largeFormat": {
"enum": [1]
}
}
}
}
},
"physicalProperties": {
"properties": {
"weight": {
"maximum": 30000
}
}
}
}
},
{
"properties": {
"physicalProperties": {
"properties": {
"weight": {
"maximum": 20000
}
}
}
}
}
]
},
{
"anyOf": [
{
Expand All @@ -48,7 +10,7 @@
"required": ["deliveryType"],
"properties": {
"deliveryType": {
"enum": ["standard", null]
"enum": ["standard", "pickup", null]
}
}
}
Expand All @@ -69,83 +31,16 @@
}
]
},
{
"anyOf": [
{
"properties": {
"deliveryOptions": {
"required": ["deliveryType", "pickupLocation"],
"properties": {
"deliveryType": {
"enum": ["pickup"]
},
"pickupLocation": {
"type": "object",
"required": ["locationCode"],
"properties": {
"locationCode": {
"type": "string"
}
}
},
"shipmentOptions": {
"properties": {
"signature": {
"enum": [1]
}
}
}
}
}
}
},
{
"properties": {
"deliveryOptions": {
"properties": {
"deliveryType": {
"enum": ["standard", null]
}
}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"deliveryOptions": {
"properties": {
"shipmentOptions": {
"required": ["insurance"],
"properties": {
"insurance": {
"enum": [
10000, 25000, 50000, 100000, 150000, 200000, 250000, 300000, 350000, 400000, 450000, 500000
]
},
"onlyRecipient": {
"enum": [1]
},
"signature": {
"enum": [1]
}
}
}
}
}
}
},
{
"properties": {
"deliveryOptions": {
"properties": {
"shipmentOptions": {
"properties": {
"insurance": {
"enum": [0, null]
"enum": [0, 1]
}
}
}
Expand All @@ -155,35 +50,5 @@
}
]
}
],
"properties": {
"physicalProperties": {
"properties": {
"weight": {
"note": "Do not put (low) maximum here, for it will be enforced regardless of largeFormat in anyOf",
"minimum": 1
}
}
},
"deliveryOptions": {
"properties": {
"shipmentOptions": {
"properties": {
"deliveryType": {
"enum": ["standard", "pickup", null]
},
"labelDescription": {
"maxLength": 50
},
"sameDayDelivery": {
"enum": [0]
},
"tracked": {
"enum": [0, 1]
}
}
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion config/schema/belgie/order/postnl/nl_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"deliveryOptions": {
"properties": {
"deliveryType": {
"enum": ["standard", null]
"enum": ["standard", "pickup", null]
}
}
}
Expand Down

0 comments on commit 8a9a8e3

Please sign in to comment.