{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pictify-io/json-schema/pictify-io-binding-schema.json",
  "title": "Binding",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pictify-io-bindings-api-openapi.yml#/components/schemas/Binding",
  "type": "object",
  "properties": {
    "uid": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "templateId": {
      "type": "string"
    },
    "dataSource": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "http",
            "webhook",
            "static"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "method": {
          "type": "string",
          "enum": [
            "GET",
            "POST"
          ]
        }
      }
    },
    "mapping": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "defaults": {
      "type": "object",
      "additionalProperties": true
    },
    "refreshPolicy": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ttl",
            "etag",
            "webhook",
            "manual"
          ]
        },
        "ttlSeconds": {
          "type": "integer"
        },
        "onError": {
          "type": "string",
          "enum": [
            "serve_stale",
            "serve_error",
            "serve_default"
          ]
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused",
        "error"
      ]
    },
    "renderUrl": {
      "type": "string",
      "format": "uri"
    },
    "webhookUrl": {
      "type": "string",
      "format": "uri"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}