{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/vtestunit-yaml/latest.json",
  "title": "vtestunit.yaml",
  "description": "Vector test unit description",
  "x-lintel": {
    "source": "https://www.schemastore.org/vtestunit-schema.json",
    "sourceSha256": "3a3fc611dc6363e66bf3fd039c32fa4ad2bd4f27877472f5ca5d4e4e6fa2a599",
    "fileMatch": [
      "*.vtestunit.yaml",
      "*.vtestunit.yml",
      "*.vtestunit.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "$ref": "#/$defs/e517/full",
  "$defs": {
    "e517": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "vtestunit.yaml",
        "description": "Vector test unit description",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/definitions/1edb/full"
          },
          {
            "$ref": "#/definitions/eacd/full"
          },
          {
            "$ref": "#/definitions/5701/full"
          }
        ]
      }
    },
    "eacd": {
      "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/7d27/full"
          }
        }
      }
    },
    "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"
        ]
      }
    },
    "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"
        ]
      }
    },
    "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": {
                  "$ref": "#/definitions/5342/full",
                  "title": "CAPL Library Path",
                  "description": "Path to a CAPL library file (.dll).",
                  "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"
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "1edb": {
      "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/5be0/full"
          },
          "includes": {
            "$ref": "#/definitions/6c39/full"
          },
          "test-unit-information": {
            "$ref": "#/definitions/2f00/full"
          },
          "test-unit-implementation": {
            "$ref": "#/definitions/4c33/full"
          },
          "variant-properties": {
            "$ref": "#/definitions/2b58/full"
          },
          "trace-items": {
            "$ref": "#/definitions/9ddf/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"
          }
        }
      }
    },
    "5be0": {
      "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.1.0$",
        "type": "string",
        "examples": [
          "2.1.0"
        ]
      }
    },
    "5342": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "string",
        "pattern": "^.*\\.[dD][lL][lL]$"
      }
    },
    "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"
              }
            ]
          }
        ]
      }
    },
    "4c33": {
      "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/.py/.cs/.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.cs",
                    "Source2.can",
                    "Source3.canencr",
                    "Source4.py",
                    "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": {
                  "$ref": "#/definitions/5342/full",
                  "title": "CAPL Library Path",
                  "description": "Path to a CAPL library file (.dll).",
                  "examples": [
                    "path/to/my.dll"
                  ]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "dotnet-assembly-path": {
                  "$ref": "#/definitions/5342/full",
                  "title": ".NET Assembly Path",
                  "description": "Path to a .NET assembly file (.dll).",
                  "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"
                  ]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "traceitem-file-path": {
                  "type": "string",
                  "title": "Traceitem File Path",
                  "description": "Path to a traceitem file (.vti-tso).",
                  "oneOf": [
                    {
                      "pattern": "^.*\\.[Vv][Tt][Ii]-[Tt][Ss][Oo]$"
                    }
                  ],
                  "examples": [
                    "Traceitems.vti-tso"
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "2b58": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Variant Properties",
        "description": "Extension with variant support. The name of the variant and the corresponding variant table must be specified.",
        "type": "array",
        "minItems": 0,
        "maxItems": 1,
        "items": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "name": {
              "type": "string"
            },
            "value-table": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "name",
            "value-table"
          ]
        },
        "examples": [
          [
            {
              "name": "SUT",
              "value-table": [
                "SUTA",
                "SUTB"
              ]
            }
          ]
        ]
      }
    },
    "9ddf": {
      "full": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "Trace Items",
        "description": "File paths to requirement or test specification files (.vti-tso).",
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "file-path": {
                  "type": "string",
                  "title": "Trace Item File Path",
                  "description": "File path to a requirement or test specification file (.vti-tso).",
                  "oneOf": [
                    {
                      "pattern": "^.*\\.[Vv][Tt][Ii]-[Tt][Ss][Oo]$"
                    }
                  ],
                  "examples": [
                    "path/to/my/TraceItemFile.vti-tso"
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "7d27": {
      "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/.py/.cs.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.cs",
                    "Source2.can",
                    "Source3.canencr",
                    "Source4.py",
                    "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": {
                  "$ref": "#/definitions/5342/full",
                  "title": "CAPL Library Path",
                  "description": "Path to a CAPL library file (.dll).",
                  "examples": [
                    "path/to/my.dll"
                  ]
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "dotnet-assembly-path": {
                  "$ref": "#/definitions/5342/full",
                  "title": ".NET Assembly Path",
                  "description": "Path to a .NET assembly file (.dll).",
                  "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"
                  ]
                }
              }
            }
          ]
        }
      }
    },
    "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"
              }
            ]
          }
        ]
      }
    },
    "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": "#/$defs/6c39/local/one"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/6c39/local/one"
          }
        }
      ],
      "examples": [
        "my_include.yaml",
        [
          "my_include.yaml",
          "my_other_include.json"
        ]
      ]
    }
  }
}
