Revision 35ef11d0f60dae103603ee92fd71a98bc3e12e7c authored by Luke Bjerring on 23 March 2018, 19:14:21 UTC, committed by Luke Bjerring on 23 March 2018, 19:58:00 UTC
1 parent 4578f69
Raw File
id.json
{
  "$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" }
      }
    }
  }
}
back to top