{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stormmcp/json-schema/stormmcp-test-yaml-response-schema.json",
  "title": "TestYamlResponse",
  "description": "Response model for the SpecLink test-yaml endpoint. Flat shape with an bool TestYamlResponse.Ok\ndiscriminator: on failure string? TestYamlResponse.Stage identifies where it failed and the matching\nnullable fields carry the detail; on success the preview fields are populated.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stormmcp-customremoteservers-api-openapi.yml#/components/schemas/TestYamlResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Gets or sets a value indicating whether the YAML was fetched, parsed, and previewed successfully."
    },
    "stage": {
      "type": [
        "null",
        "string"
      ],
      "description": "Gets or sets the failure stage when bool TestYamlResponse.Ok is false: `validation`, `fetch`, or `parse`. Null on success."
    },
    "toolCount": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "null",
        "integer",
        "string"
      ],
      "description": "Gets or sets the total number of tools the spec produced (success only).",
      "format": "int32"
    },
    "preview": {
      "type": [
        "null",
        "array"
      ],
      "items": {
        "$ref": "#/$defs/TestYamlToolPreview"
      },
      "description": "Gets or sets the first N tools as a preview (success only)."
    },
    "previewTruncatedAt": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "null",
        "integer",
        "string"
      ],
      "description": "Gets or sets the cap the preview was truncated to (e.g. 10), when int? TestYamlResponse.ToolCount exceeds it.",
      "format": "int32"
    },
    "httpStatus": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "null",
        "integer",
        "string"
      ],
      "description": "Gets or sets the upstream HTTP status code on a `fetch` failure.",
      "format": "int32"
    },
    "hint": {
      "type": [
        "null",
        "string"
      ],
      "description": "Gets or sets an actionable hint on a `fetch` failure (e.g. token scope / repo access)."
    },
    "error": {
      "type": [
        "null",
        "string"
      ],
      "description": "Gets or sets the error detail on a `validation` or `parse` failure."
    },
    "sourceRevision": {
      "type": [
        "null",
        "string"
      ],
      "description": "Gets or sets the source revision the preview was produced from (success only): the full\ncommit SHA for a GitHub-hosted spec, or the SHA-256 of the fetched document for any other\nURL (MCPG-1891). Lets the UI show which commit was tested."
    }
  },
  "$defs": {
    "TestYamlToolPreview": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Gets or sets the tool name."
        },
        "description": {
          "type": [
            "null",
            "string"
          ],
          "description": "Gets or sets the tool description (may be truncated for the preview)."
        }
      },
      "description": "A single tool in the test-yaml preview."
    }
  }
}