{
  "openapi": "3.1.0",
  "info": {
    "title": "PlantFYI API",
    "description": "Public REST API for PlantFYI \u2014 a comprehensive plant species encyclopedia with 379,000+ plants, taxonomic classification, climate zones, growing guides, and botanical glossary.",
    "version": "1.0.0",
    "contact": {
      "url": "https://plantfyi.com/developers/"
    }
  },
  "servers": [
    {
      "url": "https://plantfyi.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/plants/": {
      "get": {
        "operationId": "listPlants",
        "summary": "List plants with optional filters",
        "parameters": [
          {
            "name": "family",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by family slug"
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by order slug"
          },
          {
            "name": "is_featured",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "Filter by featured status"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search by scientific or common name"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of plants"
          }
        }
      }
    },
    "/api/plants/{slug}/": {
      "get": {
        "operationId": "getPlant",
        "summary": "Get full plant detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "URL slug of the plant"
          }
        ],
        "responses": {
          "200": {
            "description": "Plant detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/families/": {
      "get": {
        "operationId": "listFamilies",
        "summary": "List plant families",
        "parameters": [
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by order slug"
          }
        ],
        "responses": {
          "200": {
            "description": "List of plant families"
          }
        }
      }
    },
    "/api/orders/": {
      "get": {
        "operationId": "listOrders",
        "summary": "List plant orders",
        "responses": {
          "200": {
            "description": "List of plant orders"
          }
        }
      }
    },
    "/api/countries/": {
      "get": {
        "operationId": "listCountries",
        "summary": "List countries with plant distribution data",
        "parameters": [
          {
            "name": "continent",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by continent name"
          }
        ],
        "responses": {
          "200": {
            "description": "List of countries"
          }
        }
      }
    },
    "/api/climate-zones/": {
      "get": {
        "operationId": "listClimateZones",
        "summary": "List Koppen climate zones",
        "responses": {
          "200": {
            "description": "List of climate zones"
          }
        }
      }
    },
    "/api/glossary/": {
      "get": {
        "operationId": "listGlossaryTerms",
        "summary": "List botanical glossary terms",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by category slug"
          }
        ],
        "responses": {
          "200": {
            "description": "List of glossary terms"
          }
        }
      }
    },
    "/api/guides/": {
      "get": {
        "operationId": "listGuides",
        "summary": "List growing and botany guides",
        "parameters": [
          {
            "name": "series",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by series slug"
          }
        ],
        "responses": {
          "200": {
            "description": "List of guides"
          }
        }
      }
    },
    "/api/search/": {
      "get": {
        "operationId": "search",
        "summary": "Search across plants, glossary, and guides",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query (min 1 character)"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results"
          }
        }
      }
    },
    "/api/random/": {
      "get": {
        "operationId": "randomPlant",
        "summary": "Get a random plant",
        "responses": {
          "200": {
            "description": "Random plant detail"
          }
        }
      }
    },
    "/api/stats/": {
      "get": {
        "operationId": "getStats",
        "summary": "Aggregate database statistics",
        "responses": {
          "200": {
            "description": "Count statistics"
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "operationId": "getOpenAPISpec",
        "summary": "This OpenAPI specification",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1.0 JSON"
          }
        }
      }
    }
  }
}