definitions.json 1.63 KB
Newer Older
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "definitions.json",
  "title": "REX-DRI sub-entity definition",
  "description": "Schema to hold all the main definitions of JSON schemas from the REX-DRI project",
  "definitions": {
    "useful-links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "description": "The unique identifier for a product",
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "description": {
            "description": "Name of the product",
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "url",
          "description"
        ],
        "additionalProperties": false
      }
    },
    "photos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "licence": {
            "type": "string",
            "maxLength": 500
          },
          "url": {
            "description": "The unique identifier for a product",
            "type": "string",
            "format": "uri",
            "pattern": "^.*\\.(svg|png|jpg|jpeg)$",
            "maxLength": 500
          },
          "description": {
            "description": "Short description of the picture",
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "url",
          "title"
        ],
        "additionalProperties": false
      }
    }
  }
}