summaryrefslogtreecommitdiffstats
path: root/browser/components/pagedata/schemas/product.schema.json
blob: 77bec76ff2e8856f91d6ab8180c6c224909a2ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "product.schema.json",
  "title": "Product",
  "description": "A product that can be purchased",
  "type": "object",
  "properties": {
    "name": {
      "description": "The product's name",
      "type": "string"
    },
    "brand": {
      "description": "The product's brand",
      "type": "string"
    },
    "price": {
      "description": "The cost of a single unit",
      "type": "object",
      "properties": {
        "value": {
          "type": "number"
        },
        "currency": {
          "description": "The currency for the value",
          "type": "string"
        }
      },
      "required": ["value"]
    },
    "shippingCost": {
      "description": "The cost of shipping",
      "type": "object",
      "properties": {
        "value": {
          "type": "number"
        },
        "currency": {
          "description": "The currency for the value",
          "type": "string"
        }
      },
      "required": ["value"]
    }
  },
  "required": ["name"]
}