Skip to content

Instantly share code, notes, and snippets.

@jadhavj
Created January 6, 2016 09:02
Show Gist options
  • Save jadhavj/a3ea68c572e3ca341f9b to your computer and use it in GitHub Desktop.
Save jadhavj/a3ea68c572e3ca341f9b to your computer and use it in GitHub Desktop.
{
"$schema": "Productschema",
"id": "Product",
"type": "object",
"properties": {
"ID": {
"id": "ID",
"type": "string"
},
"Name": {
"id": "Name",
"type": "string"
},
"Category": {
"id": "Category",
"type": "string"
},
"Sub-category": {
"id": "Sub-category",
"type": "string"
},
"Pricing": {
"id": "Pricing",
"type": "object",
"properties": {
"Cost_price": {
"id": "Pricing/Cost_price",
"type": "number"
},
"Discount": {
"id": "Pricing/Discount",
"type": "number",
"pattern":"^(100\.00|100\.0|100)|([0-9]{1,2}){0,1}(\.[0-9]{1,2}){0,1}$"
},
"Selling_price": {
"id": "Pricing/Selling_price",
"type": "number"
}
}
},
"Features": {
"id": "Features",
"type": "array",
"items": [
{
"id": "Features/0",
"type": "string"
},
{
"id": "Features/1",
"type": "string"
},
{
"id": "Features/2",
"type": "string"
},
{
"id": "Features/3",
"type": "string"
}
]
},
"Image": {
"id": "Images",
"type": "string",
"media": {
"binaryEncoding": "base64",
"type": "image/png"
}
},
"Specifications": {
"id": "Specifications",
"type": "object",
"properties": {
"Brand": {
"id": "Specifications/Brand",
"type": "string"
},
"ModelNo": {
"id": "Specifications/ModelNo",
"type": "value"
},
"Color": {
"id": "Specifications/Color",
"type": "string"
},
"Size": {
"id": "Specifications/Size",
"type": "value"
}
}
},
"items_in_stock": {
"id": "items_in_stock",
"type": "integer"
},
"Seller": {
"id": "Seller",
"type": "object",
"properties": {
"Name": {
"id": "Seller/Name",
"type": "string"
},
"Address": {
"id": "Seller/Address",
"type": "object",
"properties": {
"Street": {
"id": "Seller/Address/Street",
"type": "string"
},
"City": {
"id": "Seller/Address/City",
"type": "string"
},
"State": {
"id": "Seller/Address/State",
"type": "string"
},
"Zip": {
"id": "Seller/Address/Zip",
"type": "integer"
}
}
}
}
},
"cities_for_delivery": {
"id": "cities_for_delivery",
"type": "array",
"items": [
{
"id": "cities_for_delivery/0",
"type": "string"
},
{
"id": "cities_for_delivery/1",
"type": "string"
},
{
"id": "cities_for_delivery/2",
"type": "string"
},
{
"id": "cities_for_delivery/3",
"type": "string"
}
]
}
},
"required": [
"ID",
"Name",
"Category",
"Pricing",
"items_in_stock",
"Seller",
"Specifications/ModelNo"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment