{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cheapest-domains/json-schema/cheapest-domains-registrars-schema.json",
  "title": "Registrars",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cheapest-domains-registrars-api-openapi.yml#/components/schemas/Registrars",
  "$ref": "#/$defs/Envelope",
  "$defs": {
    "Coverage": {
      "type": "object",
      "required": [
        "scope",
        "totalOffers",
        "freshOffers",
        "sources",
        "notCompared",
        "partial"
      ],
      "properties": {
        "scope": {
          "type": "string"
        },
        "totalOffers": {
          "type": "integer"
        },
        "freshOffers": {
          "type": "integer"
        },
        "partial": {
          "type": "boolean"
        },
        "error": {
          "type": [
            "string",
            "null"
          ]
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Source"
          }
        },
        "notCompared": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "Envelope": {
      "type": "object",
      "required": [
        "service",
        "apiVersion",
        "generatedAt",
        "currency",
        "coverage",
        "limits"
      ],
      "properties": {
        "service": {
          "$ref": "#/$defs/ServiceInformation"
        },
        "apiVersion": {
          "type": "string"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "currency": {
          "const": "USD"
        },
        "availability": {
          "const": "not_checked"
        },
        "coverage": {
          "$ref": "#/$defs/Coverage"
        },
        "limits": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ServiceInformation": {
      "type": "object",
      "required": [
        "name",
        "url",
        "setupUrl",
        "pluginUrl"
      ],
      "description": "Cheapest Domains identity and optional setup links, separate from upstream evidence. Does not establish client installation or provider health.",
      "properties": {
        "name": {
          "const": "Cheapest Domains"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "setupUrl": {
          "type": "string",
          "format": "uri"
        },
        "pluginUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Source": {
      "type": "object",
      "required": [
        "id",
        "name",
        "url",
        "offerCount",
        "freshOfferCount",
        "stale",
        "refreshing"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "note": {
          "type": "string"
        },
        "offerCount": {
          "type": "integer"
        },
        "freshOfferCount": {
          "type": "integer"
        },
        "fetchedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "nextRefreshAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the saved catalog is due for its next scheduled refresh; not an expiry of its prices."
        },
        "stale": {
          "type": "boolean",
          "description": "True when the source’s last refresh failed and its saved catalog is at least 24 hours old. Passing nextRefreshAt alone does not make prices stale; a scheduled refresh every 15 minutes replaces due catalogs."
        },
        "refreshing": {
          "type": "boolean"
        },
        "error": {
          "type": [
            "string",
            "null"
          ]
        },
        "refresh": {
          "type": "object",
          "required": [
            "phase",
            "completed",
            "total",
            "startedAt",
            "resumeAt"
          ],
          "description": "Progress of a staged catalog refresh, when one exists. Saved prices remain usable meanwhile.",
          "properties": {
            "phase": {
              "enum": [
                "queued",
                "running",
                "waiting",
                "paused",
                "complete"
              ]
            },
            "completed": {
              "type": "integer",
              "minimum": 0
            },
            "total": {
              "type": "integer",
              "minimum": 0
            },
            "startedAt": {
              "type": "integer",
              "description": "Unix time in milliseconds."
            },
            "resumeAt": {
              "type": "integer",
              "description": "Unix time in milliseconds."
            }
          }
        }
      }
    }
  }
}