{
    "openapi": "3.0.3",
    "info": {
        "title": "Hydraulic Pictures Public Pages",
        "version": "1.0.0",
        "description": "Read published public business pages. No credentials required; no writes, bookings, private content or form submissions."
    },
    "servers": [
        {
            "url": "https://hydraulicpictures.com/wp-json/hydraulic-agent/v1"
        }
    ],
    "paths": {
        "/pages": {
            "get": {
                "operationId": "listPublicPages",
                "summary": "Find Hydraulic Pictures public business pages",
                "description": "List the approved public business pages, optionally matching a search term.",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Optional term to find in public page titles and text.",
                        "schema": {
                            "type": "string",
                            "maxLength": 200
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page of results.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Maximum results per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 20,
                            "default": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public page information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Page"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request or page not available",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/pages/{id}": {
            "get": {
                "operationId": "readPublicPage",
                "summary": "Read one public business page",
                "description": "Read a page returned by listPublicPages. Other IDs return 404.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Public page identifier.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public page information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Page"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid request or page not available",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Invalid request or page not available",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Page": {
                "type": "object",
                "required": [
                    "id",
                    "title",
                    "url",
                    "markdown_url",
                    "content"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "markdown_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "content": {
                        "type": "string",
                        "description": "Markdown derived from the public page."
                    }
                }
            }
        }
    }
}
