{
 "openapi": "3.0.3",
 "info": {
  "title": "Doğa Atlası API",
  "version": "1.0.0",
  "description": "Türkiye'nin plaj, şelale, göl, kamp ve karavan alanları rehberi: güncel giriş ücretleri, deniz suyu analizleri, valilik yasakları ve hava durumu.\n\nLisans ve atıf: Veriler OpenStreetMap (ODbL), Wikidata (CC0), Vikipedi (CC BY-SA 4.0) ve resmi kaynaklardan derlenmiştir. Kullanırken “Doğa Atlası” adını ve sayfa bağlantısını kaynak olarak gösterin; OSM kaynaklı veriler ODbL koşullarına tabidir."
 },
 "servers": [
  {
   "url": "https://dogaatlasi.com"
  }
 ],
 "paths": {
  "/api/v1/index.json": {
   "get": {
    "summary": "Uç noktalar, iller ve kategoriler",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/v1/categories.json": {
   "get": {
    "summary": "Kategoriler ve yer sayıları",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/v1/provinces.json": {
   "get": {
    "summary": "81 il: ilçeler, sayılar, valilik duyuruları, hava durumu",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/v1/il/{il}.json": {
   "get": {
    "summary": "Bir ildeki tüm yerler, tüm alanlarıyla",
    "parameters": [
     {
      "name": "il",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "example": "izmir"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "province": {
           "type": "object"
          },
          "places": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string",
              "example": "osm-w123456"
             },
             "cat": {
              "type": "string",
              "example": "plaj"
             },
             "name": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "example": "/izmir/seferihisar/buyuk-akkum-plaji/"
             },
             "il": {
              "type": "string"
             },
             "ilce": {
              "type": "string"
             },
             "lat": {
              "type": "number"
             },
             "lon": {
              "type": "number"
             },
             "summary": {
              "type": "string"
             },
             "paras": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "facts": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "k": {
                 "type": "string"
                },
                "v": {
                 "type": "string"
                },
                "src": {
                 "type": "string"
                }
               }
              }
             },
             "faq": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "q": {
                 "type": "string"
                },
                "a": {
                 "type": "string"
                }
               }
              }
             },
             "mb": {
              "type": "object",
              "nullable": true,
              "description": "Mavi Bayrak: sezon ve deniz suyu analizleri"
             },
             "dkmp": {
              "type": "object",
              "nullable": true,
              "description": "Resmi giriş ücretleri (kişi, otomobil, karavan)"
             },
             "weather": {
              "type": "array",
              "nullable": true,
              "items": {
               "type": "object"
              }
             },
             "nearby": {
              "type": "array",
              "items": {
               "type": "object"
              }
             },
             "sources": {
              "type": "array",
              "items": {
               "type": "string"
              }
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/search-index.json": {
   "get": {
    "summary": "Hafif arama listesi: [ad, url, kategori, il, ilçe, enlem, boylam, puan]",
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/place/{id}": {
   "get": {
    "summary": "Bir yerin onaylı canlı ziyaretçi notları",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     }
    }
   }
  },
  "/api/submit": {
   "post": {
    "summary": "Ziyaretçi notu / fotoğraf gönder (multipart/form-data)",
    "responses": {
     "200": {
      "description": "OK"
     },
     "400": {
      "description": "Geçersiz"
     },
     "429": {
      "description": "Çok fazla istek"
     }
    }
   }
  }
 }
}