{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-policy-attachment-dbresponse-schema.json",
  "title": "PolicyAttachmentDBResponse",
  "description": "Response for a policy attachment from the database.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-policy-engine-api-openapi.yml#/components/schemas/PolicyAttachmentDBResponse",
  "properties": {
    "attachment_id": {
      "description": "Unique ID of the attachment.",
      "title": "Attachment Id",
      "type": "string"
    },
    "created_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "When the attachment was created.",
      "title": "Created At"
    },
    "created_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Who created the attachment.",
      "title": "Created By"
    },
    "keys": {
      "description": "Key patterns.",
      "items": {
        "type": "string"
      },
      "title": "Keys",
      "type": "array"
    },
    "models": {
      "description": "Model patterns.",
      "items": {
        "type": "string"
      },
      "title": "Models",
      "type": "array"
    },
    "policy_name": {
      "description": "Name of the attached policy.",
      "title": "Policy Name",
      "type": "string"
    },
    "scope": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Scope of the attachment.",
      "title": "Scope"
    },
    "tags": {
      "description": "Tag patterns.",
      "items": {
        "type": "string"
      },
      "title": "Tags",
      "type": "array"
    },
    "teams": {
      "description": "Team patterns.",
      "items": {
        "type": "string"
      },
      "title": "Teams",
      "type": "array"
    },
    "updated_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "When the attachment was last updated.",
      "title": "Updated At"
    },
    "updated_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Who last updated the attachment.",
      "title": "Updated By"
    }
  },
  "required": [
    "attachment_id",
    "policy_name"
  ],
  "type": "object"
}