{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aisle-wedding/json-schema/aisle-wedding-room-result-schema.json",
  "title": "RoomResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aisle-wedding-stays-api-openapi.yml#/components/schemas/RoomResult",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/PublicRoom"
    }
  },
  "$defs": {
    "PublicPaymentSchedule": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "deposit_unit",
        "deposit_amount",
        "deposit_due_date",
        "balance_due_date"
      ],
      "properties": {
        "deposit_unit": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "percent",
                "amount"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "deposit_amount": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "deposit_due_date": {
          "oneOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "balance_due_date": {
          "oneOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "PublicRoom": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "property_id",
        "name",
        "type",
        "description",
        "capacity",
        "capacity_max",
        "bed_config",
        "images",
        "status",
        "booking_url",
        "booked_by_party_id",
        "stay",
        "rate",
        "payment_schedule",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^acc_.+$"
        },
        "property_id": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^prp_.+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "capacity": {
          "type": "integer"
        },
        "capacity_max": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "bed_config": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "images": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "unavailable"
          ]
        },
        "booking_url": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "booked_by_party_id": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^pty_.+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "stay": {
          "$ref": "#/$defs/PublicStay"
        },
        "rate": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "requires_payment",
            "unit",
            "amount"
          ],
          "properties": {
            "requires_payment": {
              "type": "boolean"
            },
            "unit": {
              "type": "string",
              "enum": [
                "room",
                "night",
                "party",
                "head",
                "open"
              ]
            },
            "amount": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "payment_schedule": {
          "$ref": "#/$defs/PublicPaymentSchedule"
        },
        "created_at": {
          "$ref": "#/$defs/Timestamp"
        },
        "updated_at": {
          "$ref": "#/$defs/Timestamp"
        }
      }
    },
    "PublicStay": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "check_in_date",
        "check_out_date",
        "check_in_time",
        "check_out_time",
        "check_in_notes"
      ],
      "properties": {
        "check_in_date": {
          "oneOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "check_out_date": {
          "oneOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ]
        },
        "check_in_time": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "check_out_time": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "check_in_notes": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "An RFC 3339 UTC timestamp with milliseconds."
    }
  }
}