{
  "$id": "https://json.schemastore.org/vtestunit-schema.json",
  "type": "object",
  "$ref": "#/definitions/fca2/full",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "vtestunit.yaml",
  "description": "Vector test unit description",
  "definitions": {
    "fca2": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "vtestunit.yaml",
        "description": "Vector test unit description",
        "type": "object",
        "required": ["version"],
        "oneOf": [
          {
            "allOf": [
              {
                "properties": {
                  "version": {
                    "const": "1.0.0"
                  }
                }
              },
              {
                "$ref": "#/definitions/5701/full"
              }
            ]
          },
          {
            "allOf": [
              {
                "properties": {
                  "version": {
                    "const": "2.0.0"
                  }
                }
              },
              {
                "$ref": "#/definitions/798b/full"
              }
            ]
          }
        ]
      }
    },
    "5701": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "vtestunit.yaml",
        "description": "Vector test unit description",
        "type": "object",
        "additionalProperties": false,
        "required": ["version"],
        "properties": {
          "version": {
            "$ref": "#/definitions/b807/full"
          },
          "includes": {
            "$ref": "#/definitions/6c39/full"
          },
          "test-unit-information": {
            "$ref": "#/definitions/52a0/full"
          },
          "test-unit-implementation": {
            "$ref": "#/definitions/d6e3/full"
          }
        }
      }
    },
    "798b": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "vtestunit.yaml",
        "description": "Vector test unit description",
        "type": "object",
        "additionalProperties": false,
        "required": ["version"],
        "properties": {
          "version": {
            "$ref": "#/definitions/dfd6/full"
          },
          "includes": {
            "$ref": "#/definitions/6c39/full"
          },
          "test-unit-information": {
            "$ref": "#/definitions/2f00/full"
          },
          "test-unit-implementation": {
            "$ref": "#/definitions/3a9b/full"
          }
        }
      }
    },
    "b807": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Version",
        "description": "Json schema version for the test unit configuration file. Acceptance criteria: equal major version, less/equal minor and patch version.",
        "pattern": "^1.0.0$",
        "type": "string",
        "examples": ["1.0.0"]
      }
    },
    "6c39": {
      "local": {
        "one": {
          "type": "string",
          "pattern": "\\.([Yy][Aa][Mm][Ll]|[Jj][Ss][Oo][Nn])$"
        }
      },
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Include files",
        "description": "Include a different file (similar to #include of the c preprocessor). The order of includes does not matter. Circular / multiple includes are resolved correctly.",
        "oneOf": [
          {
            "$ref": "#/definitions/6c39/local/one"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/definitions/6c39/local/one"
            }
          }
        ],
        "examples": [
          "my_include.yaml",
          ["my_include.yaml", "my_other_include.json"]
        ]
      }
    },
    "52a0": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Test Unit Information",
        "description": "Miscellaneous test unit information can be defined. After the execution they are available in the test report.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "caption": {
            "description": "Caption of the test unit.",
            "type": "string",
            "examples": ["My caption"]
          },
          "description": {
            "description": "Description of the test unit.",
            "type": "string",
            "examples": ["My description"]
          },
          "version": {
            "description": "Version of the test unit.",
            "type": "string",
            "examples": ["v1.0"]
          },
          "test-designer": {
            "description": "Information on the test developer(s). A sequence of key-value pairs that can be freely selected.",
            "type": "array",
            "items": {
              "type": "object"
            },
            "examples": [
              [
                {
                  "prename": "Max",
                  "surname": "S.",
                  "department": "Department A"
                },
                {
                  "prename": "Linda",
                  "department": "Department B"
                }
              ]
            ]
          },
          "additional-information": {
            "description": "Additional key-value pairs. One key 'name' is required, the other keys can be freely selected.",
            "type": "array",
            "items": {
              "type": "object",
              "required": ["name"],
              "properties": {
                "name": {
                  "type": "string",
                  "examples": ["A descriptive name"]
                }
              }
            },
            "examples": [
              [
                {
                  "name": "SUT",
                  "customerName": "Customer A"
                }
              ]
            ]
          }
        },
        "examples": [
          {
            "caption": "This is a caption",
            "description": "This is a description",
            "version": "v1.0.0",
            "test-designers": [
              {
                "name": "Max",
                "department": "PND123"
              },
              {
                "name": "Lisa",
                "department": "PND345"
              }
            ],
            "additional-information": [
              {
                "name": "Software Under Test",
                "CustomerName": "My customer",
                "SpareNumber": " 012345",
                "SRSBasleine": "4.1"
              }
            ]
          }
        ]
      }
    },
    "d6e3": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Test Unit Implementation",
        "description": "Source artifacts of the test unit. Absolute and relative paths are allowed. Relative path specifications are resolved relative to the vtestunit.yaml file.",
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "source-file-path": {
                  "type": "string",
                  "title": "Source File Path",
                  "description": "Path to a source file (.can/.canencr/.vtesttree.yaml).",
                  "anyOf": [
                    {
                      "pattern": "^.*\\.[Cc][Aa][Nn]$"
                    },
                    {
                      "pattern": "^.*\\.[Cc][Aa][Nn][Ee][Nn][Cc][Rr]$"
                    },
                    {
                      "pattern": "^.*\\.vtesttree.[yY][aA][mM][lL]$"
                    }
                  ],
                  "examples": [
                    "Source1.can",
                    "Source2.canencr",
                    "path/to/my/Source3.vtesttree.yaml"
                  ]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "capl-library-path": {
                  "title": "CAPL Library Path",
                  "description": "Path to a CAPL library file (.dll).",
                  "$ref": "#/definitions/5342/full",
                  "examples": ["path/to/my.dll"]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "modeling-library-path": {
                  "type": "string",
                  "title": "Modeling Library Path",
                  "description": "Path to a modeling library file (.vmodule).",
                  "pattern": "^.*\\.[vV][mM][oO][dD][uU][lL][eE]$",
                  "examples": ["path/to/my.vmodule"]
                }
              }
            }
          ]
        }
      }
    },
    "dfd6": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Version",
        "description": "Json schema version for the test unit configuration file. Acceptance criteria: equal major version, less/equal minor and patch version.",
        "pattern": "^2.0.0$",
        "type": "string",
        "examples": ["2.0.0"]
      }
    },
    "2f00": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Test Unit Information",
        "description": "Miscellaneous test unit information can be defined. After the execution they are available in the test report.",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "caption": {
            "description": "Caption of the test unit.",
            "type": "string",
            "examples": ["My caption"]
          },
          "description": {
            "description": "Description of the test unit.",
            "type": "string",
            "examples": ["My description"]
          },
          "version": {
            "description": "Version of the test unit.",
            "type": "string",
            "examples": ["v1.1"]
          },
          "test-designers": {
            "description": "Information on the test developer(s). A sequence of key-value pairs that can be freely selected.",
            "type": "array",
            "items": {
              "type": "object"
            },
            "examples": [
              [
                {
                  "prename": "Max",
                  "surname": "S.",
                  "department": "Department A"
                },
                {
                  "prename": "Linda",
                  "department": "Department B"
                }
              ]
            ]
          },
          "additional-information": {
            "description": "Additional key-value pairs. One key 'name' is required, the other keys can be freely selected.",
            "type": "array",
            "items": {
              "type": "object",
              "required": ["name"],
              "properties": {
                "name": {
                  "type": "string",
                  "examples": ["A descriptive name"]
                }
              }
            },
            "examples": [
              [
                {
                  "name": "SUT",
                  "customerName": "Customer A"
                }
              ]
            ]
          }
        },
        "examples": [
          {
            "caption": "This is a caption",
            "description": "This is a description",
            "version": "v1.0.0",
            "test-designers": [
              {
                "name": "Max",
                "department": "PND123"
              },
              {
                "name": "Lisa",
                "department": "PND345"
              }
            ],
            "additional-information": [
              {
                "name": "Software Under Test",
                "CustomerName": "My customer",
                "SpareNumber": " 012345",
                "SRSBasleine": "4.1"
              }
            ]
          }
        ]
      }
    },
    "3a9b": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Test Unit Implementation",
        "description": "Source artifacts of the test unit. Absolute and relative paths are allowed. Relative path specifications are resolved relative to the vtestunit.yaml file.",
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "source-file-path": {
                  "type": "string",
                  "title": "Source File Path",
                  "description": "Path to a source file (.can/.canencr/.vtesttree.yaml).",
                  "oneOf": [
                    {
                      "pattern": "^.*\\.[Cc][Ss]$"
                    },
                    {
                      "pattern": "^.*\\.[Cc][Aa][Nn]$"
                    },
                    {
                      "pattern": "^.*\\.[Cc][Aa][Nn][Ee][Nn][Cc][Rr]$"
                    },
                    {
                      "pattern": "^.*\\.[Pp][Yy]$"
                    },
                    {
                      "pattern": "^.*\\.vtesttree.[yY][aA][mM][lL]$"
                    }
                  ],
                  "examples": [
                    "Source1.can",
                    "Source2.canencr",
                    "path/to/my/Source3.vtesttree.yaml"
                  ]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "python-package-path": {
                  "title": "Python Package Path",
                  "description": "Path to a python package.",
                  "type": "string",
                  "examples": ["path/to/my/python/package"]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "capl-library-path": {
                  "title": "CAPL Library Path",
                  "description": "Path to a CAPL library file (.dll).",
                  "$ref": "#/definitions/5342/full",
                  "examples": ["path/to/my.dll"]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "dotnet-assembly-path": {
                  "title": ".NET Assembly Path",
                  "description": "Path to a .NET assembly file (.dll).",
                  "$ref": "#/definitions/5342/full",
                  "examples": ["path/to/my.dll"]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "dotnet-framework-assembly-name": {
                  "title": ".NET framework assembly name",
                  "description": "Name of .NET framework assembly",
                  "type": "string"
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "modeling-library-path": {
                  "type": "string",
                  "title": "Modeling Library Path",
                  "description": "Path to a modeling library file (.vmodule).",
                  "pattern": "^.*\\.[vV][mM][oO][dD][uU][lL][eE]$",
                  "examples": ["path/to/my.vmodule"]
                }
              }
            }
          ]
        }
      }
    },
    "5342": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "string",
        "pattern": "^.*\\.[dD][lL][lL]$"
      }
    }
  }
}
