summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/annotation-model/definitions/id.json
blob: b037e87c94fc9eb35ff99c607a724e5a6a0989e8 (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
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id" : "id.json",
  "title": "Definitions: id key",
  "description": "Schemas in #/definitions used to detect valid id (string of format uri or array containing 1 item of string, format uri).",
  "definitions":
  {
    "stringUri" :
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "string",
      "format": "uri"
    },

    "arraySingleStringUri":
    {
      "oneOf":
        [
        { "$ref": "#/definitions/stringUri" },
        { "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "items": { "$ref": "#/definitions/stringUri" }
        }
        ]
    },

    "idValueFound":
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "required": [ "id" ],
      "properties": {
        "id" : { "$ref": "#/definitions/arraySingleStringUri" }
      }
    }
  }
}