{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/glyphapi-dev/json-schema/glyphapi-dev-subscription-create-in-schema.json",
  "title": "SubscriptionCreateIn",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/glyphapi-dev-subscriptions-api-openapi.yml#/components/schemas/SubscriptionCreateIn",
  "properties": {
    "topic_filter": {
      "additionalProperties": true,
      "type": "object",
      "title": "Topic Filter",
      "description": "Match predicate (AND across keys). Allowed keys: source: list[str], min_severity: float in [0,10], keywords: list[str] (case-insensitive substring on title/text), affected_ecosystem: list[str] (only matches CVE rows)."
    },
    "delivery_kind": {
      "type": "string",
      "title": "Delivery Kind",
      "description": "'sse' or 'webhook'"
    },
    "webhook_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Url",
      "description": "Required when delivery_kind='webhook'. Must be http(s)."
    }
  },
  "type": "object",
  "required": [
    "delivery_kind"
  ]
}