{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pexafy/json-schema/pexafy-collection-envelope-schema.json",
  "title": "CollectionEnvelope",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pexafy-collections-api-openapi.yml#/components/schemas/CollectionEnvelope",
  "type": "object",
  "required": [
    "success",
    "data"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "$ref": "#/$defs/Collection"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    }
  },
  "$defs": {
    "Collection": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string",
          "maxLength": 120
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 2000
        },
        "is_public": {
          "type": "boolean",
          "default": false
        },
        "cover_photo_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "photos_count": {
          "type": "integer",
          "minimum": 0
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "Meta": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        },
        "took_ms": {
          "type": "number",
          "description": "Server side time, excluding transfer."
        }
      }
    }
  }
}