Skip to content

Commit 28fa1ee

Browse files
authored
Refine JSON schema for checkout receipt
1 parent fc2e2d7 commit 28fa1ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

schemas/v1.0.0/commercial/checkout/receipts/checkout.receipt.schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
"required": ["result"],
5757
"allOf": [
5858
{ "if": { "properties": { "status": { "const": "success" } }, "required": ["status"] },
59-
"then": { "properties": { "result": {} }, "required": ["result"] } },
59+
"then": { "type": "object", "properties": { "result": {} }, "required": ["result"] } },
6060
{ "if": { "properties": { "status": { "const": "error" } }, "required": ["status"] },
61-
"then": { "properties": { "error": {}, "result": false }, "required": ["error"] } },
62-
{ "if": { "properties": { "result": { "properties": { "status": { "enum": ["failed", "canceled"] } } } } },
63-
"then": { "properties": { "result": { "properties": { "metadata": {} }, "required": ["metadata"] } } } }
61+
"then": { "type": "object", "properties": { "error": {}, "result": false }, "required": ["error"] } },
62+
{ "if": { "type": "object", "properties": { "result": { "type": "object", "properties": { "status": { "enum": ["failed", "canceled"] } } } } },
63+
"then": { "type": "object", "properties": { "result": { "type": "object", "properties": { "metadata": {} }, "required": ["metadata"] } } } }
6464
]
6565
}
6666
]

0 commit comments

Comments
 (0)