{
  "openapi": "3.0.0",
  "info": {
    "title": "CI Architecture & Development Public API",
    "version": "1.0.0",
    "description": "Read-only public API for CI Architecture and Development Ltd. Provides access to services, borough planning data, approved testimonials, and business information.",
    "contact": {
      "name": "CIA+D",
      "email": "info@cia-development.com",
      "url": "https://cia-development.com"
    }
  },
  "servers": [
    {
      "url": "https://snfcyraomtpzgscoffpp.supabase.co/functions/v1/public-api",
      "description": "Production API"
    }
  ],
  "paths": {
    "/services": {
      "get": {
        "summary": "List all services",
        "description": "Returns the list of architectural services offered by CIA+D.",
        "operationId": "getServices",
        "responses": {
          "200": {
            "description": "A list of services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/Service" }
                }
              }
            }
          }
        }
      }
    },
    "/boroughs": {
      "get": {
        "summary": "List London boroughs",
        "description": "Returns planning data for London boroughs covered by CIA+D.",
        "operationId": "getBoroughs",
        "responses": {
          "200": {
            "description": "A list of boroughs with planning data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/Borough" }
                }
              }
            }
          }
        }
      }
    },
    "/testimonials": {
      "get": {
        "summary": "List approved testimonials",
        "description": "Returns approved client testimonials.",
        "operationId": "getTestimonials",
        "responses": {
          "200": {
            "description": "A list of approved testimonials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/Testimonial" }
                }
              }
            }
          }
        }
      }
    },
    "/business-info": {
      "get": {
        "summary": "Get business information",
        "description": "Returns structured business information for CIA+D.",
        "operationId": "getBusinessInfo",
        "responses": {
          "200": {
            "description": "Business information",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/BusinessInfo" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Service": {
        "type": "object",
        "properties": {
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "Borough": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "name": { "type": "string" },
          "slug": { "type": "string" },
          "strategy_overview": { "type": "string" },
          "key_constraint": { "type": "string" },
          "difficulty_rating": { "type": "integer", "minimum": 1, "maximum": 5 },
          "constraint_tags": { "type": "array", "items": { "type": "string" } },
          "planning_portal_link": { "type": "string", "format": "uri", "nullable": true }
        }
      },
      "Testimonial": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "client_name": { "type": "string" },
          "client_company": { "type": "string", "nullable": true },
          "project_type": { "type": "string", "nullable": true },
          "rating": { "type": "integer", "minimum": 1, "maximum": 5 },
          "review_text": { "type": "string" }
        }
      },
      "BusinessInfo": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "alternateName": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "telephone": { "type": "string" },
          "email": { "type": "string", "format": "email" },
          "foundingDate": { "type": "string" },
          "address": {
            "type": "object",
            "properties": {
              "street": { "type": "string" },
              "city": { "type": "string" },
              "region": { "type": "string" },
              "postalCode": { "type": "string" },
              "country": { "type": "string" }
            }
          },
          "priceRange": { "type": "string" },
          "openingHours": { "type": "string" }
        }
      }
    }
  }
}
