{
  "openapi": "3.1.0",
  "info": {
    "title": "Tellico Tractor Works Website API",
    "description": "The public HTTP API surface of the Tellico Tractor Works website, a residential and agricultural tractor-services business based in Tellico Plains, Tennessee, serving Monroe, Blount, Loudon, McMinn, and Polk Counties. This API documents the website's public HTML resources plus its RFC 9727 API discovery catalog and health endpoint.",
    "version": "1.0.0",
    "contact": {
      "name": "Tellico Tractor Works",
      "url": "https://www.tellicotractorworks.com/contact",
      "email": "tellicotractorworks@icloud.com"
    }
  },
  "servers": [
    {
      "url": "https://www.tellicotractorworks.com",
      "description": "Production website"
    }
  ],
  "tags": [
    { "name": "Pages", "description": "Public website pages returned as HTML" },
    { "name": "Discovery", "description": "RFC 9727 API catalog discovery" },
    { "name": "Health", "description": "Service health" },
    { "name": "AgentAuth", "description": "Agent authentication & registration discovery (auth.md, OAuth metadata)" }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": ["Pages"],
        "summary": "Homepage",
        "description": "Homepage describing dirt work, bush hogging, and tractor services in Tellico Plains and East Tennessee.",
        "responses": {
          "200": {
            "description": "Homepage HTML",
            "content": { "text/html": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/services": {
      "get": {
        "tags": ["Pages"],
        "summary": "Services hub",
        "description": "Overview of all 11 services offered across the 5-county service area.",
        "responses": {
          "200": {
            "description": "Services hub HTML",
            "content": { "text/html": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/contact": {
      "get": {
        "tags": ["Pages"],
        "summary": "Contact page",
        "description": "Phone, email, hours, service areas, and frequently asked questions.",
        "responses": {
          "200": {
            "description": "Contact page HTML",
            "content": { "text/html": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/reviews": {
      "get": {
        "tags": ["Pages"],
        "summary": "Customer reviews",
        "description": "Customer reviews for Tellico Tractor Works.",
        "responses": {
          "200": {
            "description": "Reviews page HTML",
            "content": { "text/html": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "tags": ["Discovery"],
        "summary": "API catalog (RFC 9727)",
        "description": "Returns a linkset conforming to RFC 9727 that advertises the service description, documentation, and status endpoints for this API.",
        "responses": {
          "200": {
            "description": "API catalog linkset",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "type": "object",
                  "required": ["linkset"],
                  "properties": {
                    "linkset": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": ["anchor", "service-desc", "service-doc"],
                        "properties": {
                          "anchor": { "type": "string", "format": "uri" },
                          "service-desc": { "type": "array" },
                          "service-doc": { "type": "array" },
                          "status": { "type": "array" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/auth.md": {
      "get": {
        "tags": ["AgentAuth"],
        "summary": "auth.md — agent authentication & registration",
        "description": "Markdown document describing how autonomous agents authenticate, register, and obtain credentials to access the Tellico Tractor Works website API surface. Served as text/markdown with an H1 heading containing 'auth.md'.",
        "responses": {
          "200": {
            "description": "auth.md Markdown document",
            "content": { "text/markdown": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "tags": ["AgentAuth"],
        "summary": "OAuth Protected Resource Metadata (RFC 9728)",
        "description": "Publishes the resource identifier, authorization_servers, scopes_supported, and bearer_methods_supported (including 'header') for this resource server.",
        "responses": {
          "200": {
            "description": "Protected Resource Metadata JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["resource", "authorization_servers", "scopes_supported", "bearer_methods_supported"],
                  "properties": {
                    "resource": { "type": "string", "format": "uri" },
                    "authorization_servers": { "type": "array", "items": { "type": "string", "format": "uri" } },
                    "scopes_supported": { "type": "array", "items": { "type": "string" } },
                    "bearer_methods_supported": { "type": "array", "items": { "type": "string", "enum": ["header"] } }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "tags": ["AgentAuth"],
        "summary": "OAuth Authorization Server Metadata (RFC 8414)",
        "description": "Publishes the authorization server metadata, including a valid issuer matching the issuer advertised in the Protected Resource Metadata, plus an agent_auth block with skill, register_uri, and registration methods supported.",
        "responses": {
          "200": {
            "description": "Authorization Server Metadata JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["issuer", "agent_auth"],
                  "properties": {
                    "issuer": { "type": "string", "format": "uri" },
                    "authorization_endpoint": { "type": "string", "format": "uri" },
                    "token_endpoint": { "type": "string", "format": "uri" },
                    "registration_endpoint": { "type": "string", "format": "uri" },
                    "scopes_supported": { "type": "array", "items": { "type": "string" } },
                    "agent_auth": {
                      "type": "object",
                      "required": ["skill", "register_uri"],
                      "properties": {
                        "skill": { "type": "string", "format": "uri" },
                        "register_uri": { "type": "string", "format": "uri" },
                        "registration_methods_supported": { "type": "array" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/health.json": {
      "get": {
        "tags": ["Health"],
        "summary": "Health check",
        "description": "Returns a health-check representation (application/health+json) for the website API.",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/health+json": {
                "schema": {
                  "type": "object",
                  "required": ["status"],
                  "properties": {
                    "status": { "type": "string", "enum": ["pass", "fail", "warn"] },
                    "version": { "type": "string" },
                    "service": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
