{
  "openapi": "3.1.0",
  "info": {
    "title": "MKTG Edge Public API",
    "summary": "MKTG Edge Digital Marketing & Web Architecture Endpoints",
    "description": "Public API providing access to MKTG Edge technical marketing case studies, modern web engineering articles, digital marketing glossary definitions, and platform health status.",
    "version": "1.0.0",
    "contact": {
      "name": "MKTG Edge Engineering Team",
      "url": "https://mktg.kr/about"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    }
  },
  "servers": [
    {
      "url": "https://mktg.kr",
      "description": "Production Edge Server"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Service Health Check",
        "description": "Returns the operational status, version, and uptime metadata for the MKTG Edge service.",
        "operationId": "getHealthStatus",
        "responses": {
          "200": {
            "description": "Service is healthy and fully operational.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/glossary": {
      "get": {
        "summary": "Marketing & Technical Glossary",
        "description": "Retrieves the full dictionary of technical SEO, performance marketing, and modern web architecture terms.",
        "operationId": "getGlossaryTerms",
        "responses": {
          "200": {
            "description": "List of glossary entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GlossaryItem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/posts": {
      "get": {
        "summary": "Unified Blog & Engineering Posts",
        "description": "Returns published engineering case studies, architecture analyses, and technical SEO posts.",
        "operationId": "getUnifiedPosts",
        "responses": {
          "200": {
            "description": "List of published posts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostItem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "summary": "RFC 9727 API Catalog",
        "description": "Automated discovery catalog adhering to RFC 9727 and RFC 9264 linkset format.",
        "operationId": "getApiCatalog",
        "responses": {
          "200": {
            "description": "API Catalog in linkset+json format.",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCatalog"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLMs.txt Context Manifest",
        "description": "Structured Markdown knowledge base designed for AI agents and LLM scrapers.",
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "LLMs.txt markdown content.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HealthStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "healthy"
          },
          "service": {
            "type": "string",
            "example": "mktg-edge"
          },
          "version": {
            "type": "string",
            "example": "1.0.0"
          },
          "uptime": {
            "type": "string",
            "example": "operational"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": ["status", "service", "version"]
      },
      "GlossaryItem": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "example": "headless-wordpress"
          },
          "term": {
            "type": "string",
            "example": "Headless WordPress"
          },
          "korean": {
            "type": "string",
            "example": "헤드리스 워드프레스"
          },
          "category": {
            "type": "string",
            "example": "Web Tech"
          },
          "summary": {
            "type": "string"
          },
          "deep_dive": {
            "type": "string"
          }
        },
        "required": ["slug", "term", "summary"]
      },
      "PostItem": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "example": "astro5-headless-wordpress-architecture"
          },
          "title": {
            "type": "string",
            "example": "Astro 5 + WordPress Headless Hybrid Architecture"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "category": {
            "type": "string",
            "example": "Architecture"
          },
          "excerpt": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": ["slug", "title", "date", "url"]
      },
      "ApiCatalog": {
        "type": "object",
        "properties": {
          "linkset": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "anchor": {
                  "type": "string",
                  "format": "uri"
                },
                "service-desc": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "href": { "type": "string", "format": "uri" },
                      "type": { "type": "string" }
                    },
                    "required": ["href"]
                  }
                },
                "service-doc": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "href": { "type": "string", "format": "uri" },
                      "type": { "type": "string" }
                    },
                    "required": ["href"]
                  }
                },
                "status": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "href": { "type": "string", "format": "uri" },
                      "type": { "type": "string" }
                    },
                    "required": ["href"]
                  }
                }
              },
              "required": ["anchor"]
            }
          }
        },
        "required": ["linkset"]
      }
    }
  }
}
