Created
December 4, 2018 22:49
-
-
Save afranzi/80adb6abd08f0ca3c8dbc64388d84788 to your computer and use it in GitHub Desktop.
Order event Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "/schema/event/order", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"user": { "$ref": "/schema/object/user" }, | |
"products": { | |
"type": "array", | |
"items": { "$ref": "/schema/object/product" } | |
}, | |
"billing_address": { "$ref": "/schema/object/address" }, | |
"shipping_address": { | |
"allOf": [ | |
{ "$ref": "/schema/object/address" }, | |
{ | |
"properties": { | |
"type": { "enum": [ "residential","business" ] } | |
}, | |
"required": [ "type" ] | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment