{
  "notice": "Fictional demo property. No real bookings.",
  "openapi": "3.1.0",
  "info": {
    "title": "Zhuyin Retreat 竹隐 API (fictional demo)",
    "version": "0.1.0",
    "description": "Fictional demo property. No real bookings. Availability lookup and inquiries only; every response includes a `notice` field."
  },
  "servers": [
    {
      "url": "https://zhuyin.visitchina.site"
    }
  ],
  "paths": {
    "/api/availability": {
      "get": {
        "operationId": "searchAvailability",
        "summary": "Availability for explicit dates",
        "parameters": [
          {
            "name": "check_in",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "check_out",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Departure date"
          },
          {
            "name": "guests",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 2
            }
          },
          {
            "name": "room_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "bamboo-view-king",
                "tea-ceremony-suite",
                "courtyard-villa"
              ]
            }
          },
          {
            "name": "pets",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Availability with nights, results, policies, notice"
          },
          "400": {
            "description": "Invalid dates"
          }
        }
      }
    },
    "/api/policies": {
      "get": {
        "operationId": "getPolicies",
        "responses": {
          "200": {
            "description": "Policies + notice"
          }
        }
      }
    },
    "/api/inquiry": {
      "post": {
        "operationId": "submitInquiry",
        "summary": "Non-binding inquiry (no booking/payment). Rate limited 5/hour/IP.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "check_in": {
                    "type": "string",
                    "format": "date"
                  },
                  "check_out": {
                    "type": "string",
                    "format": "date"
                  },
                  "guests": {
                    "type": "integer"
                  },
                  "room_type": {
                    "type": "string"
                  },
                  "pets": {
                    "type": "boolean",
                    "description": "Travelling with a pet (small dog; cats in Courtyard Villa only)"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "email",
                  "check_in",
                  "check_out",
                  "guests"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received"
          },
          "400": {
            "description": "Invalid"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/ask": {
      "get": {
        "operationId": "ask",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{answer, results, notice}"
          }
        }
      }
    }
  }
}