{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title" : "album-product",
  "description" : "The JSON schema that matches an album product.",
  "id": "https://mastert.github.io/bandcamp-scraper/schemas/album-product.json",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "name": { "type": "string" },
    "artist": { "type": "string" },    
    "format": { "type": "string" },
    "url": { "type": "string", "format": "uri" },
    "imageUrls": {
      "type": "array",
      "items": { "type": "string", "format": "uri" }
    },
    "priceInCents": {
      "oneOf": [
        { "type": "null" },
        { "type": "integer", "minimum": 0 }
      ]
    },
    "description": { "type": "string" },
    "soldOut": { "type": "boolean" },
    "nameYourPrice": { "type": "boolean" },
    "offerMore": { "type": "boolean" },
    "currency": {
      "oneOf": [
        { "type": "null" },
        { "type": "string", "minLength": 3, "maxLength": 3 }
      ]
    }
  },
  "required": [ "name", "artist", "format", "url", "imageUrls", "priceInCents", "currency", "description", "soldOut", "nameYourPrice", "offerMore" ]
}
