{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toolpin-dev/json-schema/toolpin-dev-envelope-search-result-schema.json",
  "title": "Envelope[SearchResult]",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toolpin-dev-openapi.json#/components/schemas/Envelope_SearchResult_",
  "properties": {
    "as_of": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "As Of",
      "description": "When all critical jobs had last succeeded. Null if one has never run."
    },
    "stale": {
      "type": "boolean",
      "title": "Stale",
      "description": "True when a daily job has not succeeded recently. The data is still served, and it is older than it should be."
    },
    "data": {
      "$ref": "#/$defs/SearchResult"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "as_of",
    "stale",
    "data"
  ],
  "$defs": {
    "SearchHit": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "display_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display Name"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "status": {
          "type": "string",
          "title": "Status"
        },
        "probe_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Probe Status"
        },
        "status_text": {
          "type": "string",
          "title": "Status Text"
        },
        "repo_stars": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Repo Stars"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "display_name",
        "description",
        "status",
        "probe_status",
        "status_text",
        "repo_stars"
      ],
      "title": "SearchHit"
    },
    "SearchResult": {
      "properties": {
        "query": {
          "type": "string",
          "title": "Query"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        },
        "results": {
          "items": {
            "$ref": "#/$defs/SearchHit"
          },
          "type": "array",
          "title": "Results"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "query",
        "count",
        "results"
      ],
      "title": "SearchResult"
    }
  }
}