{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whoisgeni-us/json-schema/whoisgeni-us-api-response-subdomains-response-schema.json",
  "title": "ApiResponse[SubdomainsResponse]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whoisgeni-us-jobs-api-openapi.yml#/components/schemas/ApiResponse_SubdomainsResponse_",
  "properties": {
    "data": {
      "anyOf": [
        {
          "$ref": "#/$defs/SubdomainsResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/$defs/ErrorDetail"
        },
        {
          "type": "null"
        }
      ]
    },
    "meta": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Meta"
    }
  },
  "type": "object",
  "$defs": {
    "ErrorDetail": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "details": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Details"
        }
      },
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "title": "ErrorDetail",
      "description": "Structured error information for API error responses.\n\nAttributes:\n    code: Machine-readable error code (e.g. \"JOB_NOT_FOUND\").\n    message: Human-readable error description.\n    details: Optional additional context for debugging."
    },
    "SubdomainEntry": {
      "properties": {
        "subdomain": {
          "type": "string",
          "title": "Subdomain"
        },
        "source": {
          "type": "string",
          "enum": [
            "ct_san",
            "dns_brute"
          ],
          "title": "Source"
        }
      },
      "type": "object",
      "required": [
        "subdomain",
        "source"
      ],
      "title": "SubdomainEntry",
      "description": "A single discovered subdomain with source attribution.\n\nAttributes:\n    subdomain: Fully qualified subdomain name (e.g., \"mail.example.com\").\n    source: Discovery method that found this subdomain."
    },
    "SubdomainsResponse": {
      "properties": {
        "job_id": {
          "type": "string",
          "title": "Job Id"
        },
        "domain": {
          "type": "string",
          "title": "Domain"
        },
        "subdomains": {
          "items": {
            "$ref": "#/$defs/SubdomainEntry"
          },
          "type": "array",
          "title": "Subdomains"
        },
        "total": {
          "type": "integer",
          "title": "Total"
        },
        "sources_used": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Sources Used"
        },
        "cached": {
          "type": "boolean",
          "title": "Cached"
        },
        "wildcard_detected": {
          "type": "boolean",
          "title": "Wildcard Detected"
        }
      },
      "type": "object",
      "required": [
        "job_id",
        "domain",
        "subdomains",
        "total",
        "sources_used",
        "cached",
        "wildcard_detected"
      ],
      "title": "SubdomainsResponse",
      "description": "Response for the subdomain enumeration endpoint.\n\nContains all discovered subdomains with per-entry source attribution,\ncaching metadata, and wildcard detection status.\n\nAttributes:\n    job_id: The job that triggered subdomain enumeration.\n    domain: The target domain whose subdomains were discovered.\n    subdomains: List of discovered subdomains with source attribution.\n    total: Total number of unique subdomains found.\n    sources_used: Which discovery methods were used (e.g., [\"ct_san\", \"dns_brute\"]).\n    cached: Whether the result was served from Redis cache.\n    wildcard_detected: Whether the domain has a wildcard DNS record."
    }
  }
}