{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "MlDsaSignTestVector": {
      "type": "object",
      "properties": {
        "tcId": {
          "type": "integer",
          "description": "Identifier of the test case"
        },
        "comment": {
          "type": "string",
          "description": "A brief description of the test case"
        },
        "msg": {
          "type": "string",
          "format": "HexBytes",
          "description": "[optional] The message to sign (if omitted, mu is provided to use with Sign_internal)"
        },
        "ctx": {
          "type": "string",
          "format": "HexBytes",
          "description": "[optional] The additional context string (empty if not provided)"
        },
        "mu": {
          "type": "string",
          "format": "HexBytes",
          "description": "[optional] The 64-byte μ value"
        },
        "sig": {
          "type": "string",
          "format": "HexBytes",
          "description": "The encoded signature (empty in case of expected failure)"
        },
        "result": {
          "$ref": "common.json#/definitions/Result"
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of flags"
        }
      },
      "additionalProperties": false,
      "required": ["tcId", "comment", "sig", "result", "flags"],
      "allOf": [
        {
          "if": {
            "properties": {
              "result": {
                "const": "valid"
              }
            }
          },
          "then": {
            "required": ["mu"]
          }
        },
        {
          "if": {
            "properties": {
              "flags": { "contains": { "const": "Internal" } }
            },
            "required": ["flags"]
          },
          "then": {
            "properties": { "msg": false }
          }
        }
      ]
    }
  }
}
