{
  "openapi": "3.1.0",
  "info": {
    "title": "VASTlint",
    "version": "1.0.0",
    "description": "Validate a VAST, VMAP, or DAAST XML document against IAB Tech Lab specs. Same Rust core as the web validator and the MCP server at https://vastlint.org/mcp. Use this Action when the user pastes a tag. For a live tag URL, prefer the MCP tool validate_vast_url."
  },
  "servers": [
    {
      "url": "https://vastlint.org"
    }
  ],
  "paths": {
    "/api/validate": {
      "post": {
        "operationId": "validateVast",
        "summary": "Validate VAST XML",
        "description": "Submit raw VAST XML. Returns version, a valid flag, a severity summary, and issues with stable rule IDs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["xml"],
                "properties": {
                  "xml": {
                    "type": "string",
                    "description": "Raw VAST, VMAP, or DAAST XML document."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": { "type": "boolean" },
                    "version": { "type": "string" },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "errors": { "type": "integer" },
                        "warnings": { "type": "integer" },
                        "infos": { "type": "integer" }
                      }
                    },
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": { "type": "string" },
                          "severity": { "type": "string" },
                          "message": { "type": "string" },
                          "spec_ref": { "type": "string" },
                          "path": { "type": "string" },
                          "line": { "type": "integer" },
                          "col": { "type": "integer" }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or empty xml field"
          },
          "413": {
            "description": "XML larger than 512 KB"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    }
  }
}
