{
  "openapi": "3.1.0",
  "info": {
    "title": "Mappu public travel content",
    "version": "1.0.0",
    "description": "Read-only published travel content. No login, private trips, generation, saving, editing or purchases. Use only exact URLs returned by the catalog. Travel information is reference material, not live opening-hour, price or booking confirmation."
  },
  "servers": [
    {
      "url": "https://www.mappu.ai"
    }
  ],
  "security": [],
  "paths": {
    "/agent-content/catalog.json": {
      "get": {
        "operationId": "listPublicTravelContent",
        "summary": "List published canonical pages in six public languages",
        "responses": {
          "200": {
            "description": "Public content catalog",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          },
          "404": {
            "description": "Public discovery unavailable in this environment"
          }
        }
      }
    },
    "/agent-content/index.md": {
      "get": {
        "operationId": "readPublicHomepage",
        "summary": "Read the public homepage as Markdown",
        "responses": {
          "200": {
            "description": "Public Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not available"
          }
        }
      }
    },
    "/agent-content/{segment1}/index.md": {
      "get": {
        "operationId": "readPublicPage1Segments",
        "summary": "Read a published page using its exact catalog markdownUrl",
        "description": "This template describes static public files, not an arbitrary content proxy. Select an exact markdownUrl from the catalog; do not invent or combine segments. Missing, withdrawn, alias and private pages return 404.",
        "parameters": [
          {
            "name": "segment1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published public Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No published page exists at this path"
          }
        }
      }
    },
    "/agent-content/{segment1}/{segment2}/index.md": {
      "get": {
        "operationId": "readPublicPage2Segments",
        "summary": "Read a published page using its exact catalog markdownUrl",
        "description": "This template describes static public files, not an arbitrary content proxy. Select an exact markdownUrl from the catalog; do not invent or combine segments. Missing, withdrawn, alias and private pages return 404.",
        "parameters": [
          {
            "name": "segment1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment2",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published public Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No published page exists at this path"
          }
        }
      }
    },
    "/agent-content/{segment1}/{segment2}/{segment3}/index.md": {
      "get": {
        "operationId": "readPublicPage3Segments",
        "summary": "Read a published page using its exact catalog markdownUrl",
        "description": "This template describes static public files, not an arbitrary content proxy. Select an exact markdownUrl from the catalog; do not invent or combine segments. Missing, withdrawn, alias and private pages return 404.",
        "parameters": [
          {
            "name": "segment1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment2",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment3",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published public Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No published page exists at this path"
          }
        }
      }
    },
    "/agent-content/{segment1}/{segment2}/{segment3}/{segment4}/index.md": {
      "get": {
        "operationId": "readPublicPage4Segments",
        "summary": "Read a published page using its exact catalog markdownUrl",
        "description": "This template describes static public files, not an arbitrary content proxy. Select an exact markdownUrl from the catalog; do not invent or combine segments. Missing, withdrawn, alias and private pages return 404.",
        "parameters": [
          {
            "name": "segment1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment2",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment3",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment4",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published public Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No published page exists at this path"
          }
        }
      }
    },
    "/agent-content/{segment1}/{segment2}/{segment3}/{segment4}/{segment5}/index.md": {
      "get": {
        "operationId": "readPublicPage5Segments",
        "summary": "Read a published page using its exact catalog markdownUrl",
        "description": "This template describes static public files, not an arbitrary content proxy. Select an exact markdownUrl from the catalog; do not invent or combine segments. Missing, withdrawn, alias and private pages return 404.",
        "parameters": [
          {
            "name": "segment1",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment2",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment3",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment4",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          },
          {
            "name": "segment5",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$",
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Published public Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No published page exists at this path"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Catalog": {
        "type": "object",
        "required": [
          "version",
          "origin",
          "entries"
        ],
        "additionalProperties": false,
        "properties": {
          "version": {
            "const": 1
          },
          "origin": {
            "const": "https://www.mappu.ai"
          },
          "entries": {
            "type": "array",
            "maxItems": 10000,
            "items": {
              "$ref": "#/components/schemas/PublicPage"
            }
          }
        }
      },
      "PublicPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "path",
          "locale",
          "kind",
          "title",
          "description",
          "url",
          "markdownUrl"
        ],
        "properties": {
          "path": {
            "type": "string",
            "maxLength": 300
          },
          "locale": {
            "enum": [
              "en",
              "it",
              "es",
              "fr",
              "de",
              "pt"
            ]
          },
          "kind": {
            "enum": [
              "audio-guide",
              "itinerary",
              "collection",
              "tool",
              "page"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "markdownUrl": {
            "type": "string",
            "format": "uri",
            "description": "Exact GET URL for this page. May contain multiple path segments. Returns text/markdown or a real 404 when withdrawn. Do not construct arbitrary paths."
          }
        }
      }
    }
  }
}
