{
  "$id": "/dcic/signature-commons-schema/v6/core/examples.json",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "The schema describing the examples for testing",
  "allOf": [
    {
      "$ref": "/dcic/signature-commons-schema/v6/core/meta.json"
    },
    {
      "type": "object",
      "properties": {
        "tests": {
          "type": "array",
          "description": "The actual examples to be tested, should be an instance of meta.",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name/description of this test"
              },
              "valid": {
                "type": "boolean",
                "description": "Whether or not this test is expected to pass or fail"
              },
              "skip": {
                "oneOf": [
                  {
                    "type": "boolean",
                    "description": "Whether or not to skip this test",
                    "default": false
                  },
                  {
                    "type": "string",
                    "description": "Expression for whether or not to skip this test"
                  }
                ]
              },
              "schema": {
                "type": "string",
                "description": "Schema to use for validation of this test"
              },
              "data": {
                "type": "object",
                "description": "Data to be validated with schema",
                "$validate": {
                  "$data": "0/schema"
                }
              }
            },
            "required": [
              "name",
              "valid",
              "schema",
              "data"
            ]
          }
        }
      },
      "required": [
        "tests"
      ]
    }
  ]
}
