{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisle-wedding/json-schema/aisle-wedding-registry-item-list-schema.json",
  "title": "RegistryItemList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aisle-wedding-registry-api-openapi.yml#/components/schemas/RegistryItemList",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data",
    "has_more",
    "next_cursor"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicRegistryItem"
      }
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "PublicRegistryItem": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "title",
        "description",
        "image_url",
        "goal_amount",
        "received_amount",
        "gift_count",
        "unit_label",
        "unit_price",
        "unit_count",
        "allow_custom_amount",
        "sort_order",
        "active",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^reg_.+$"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "image_url": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "goal_amount": {
          "type": "string",
          "pattern": "^\\d+(?:\\.\\d{1,2})?$",
          "description": "A decimal currency amount. It is serialized as a string."
        },
        "received_amount": {
          "type": "string",
          "pattern": "^\\d+(?:\\.\\d{1,2})?$",
          "description": "A decimal currency amount. It is serialized as a string."
        },
        "gift_count": {
          "type": "integer"
        },
        "unit_label": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "unit_price": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "unit_count": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "allow_custom_amount": {
          "type": "boolean"
        },
        "sort_order": {
          "type": "integer"
        },
        "active": {
          "type": "boolean"
        },
        "created_at": {
          "$ref": "#/$defs/Timestamp"
        },
        "updated_at": {
          "$ref": "#/$defs/Timestamp"
        }
      }
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "An RFC 3339 UTC timestamp with milliseconds."
    }
  }
}