{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/my-tv-channel-com/json-schema/my-tv-channel-com-channel-schema.json",
  "title": "Channel",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/my-tv-channel-com-openapi.yaml#/components/schemas/Channel",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "handle": {
      "$ref": "#/$defs/Handle"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "channelType": {
      "type": "string"
    },
    "isPublic": {
      "type": "boolean"
    },
    "category": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scheduleStatus": {
      "$ref": "#/$defs/ScheduleStatus"
    },
    "schedule_status": {
      "$ref": "#/$defs/ScheduleStatus",
      "description": "Snake-case alias of `scheduleStatus`; both are returned."
    },
    "watchUrl": {
      "type": "string",
      "format": "uri"
    },
    "launchGaps": {
      "type": "array",
      "description": "What this channel still needs before it can go live, in plain language. Empty once the requirements are met.",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Handle": {
      "type": "string",
      "pattern": "^[a-z0-9-]{3,63}$",
      "description": "3–63 characters, lowercase letters, digits and hyphens. Becomes the channel's subdomain — `https://{handle}.my-tv-channel.com` — so treat it as permanent."
    },
    "ScheduleStatus": {
      "type": "string",
      "enum": [
        "inactive",
        "pending",
        "active",
        "error"
      ],
      "description": "`active` means the channel is broadcasting."
    }
  }
}