{
  "openapi": "3.1.0",
  "info": { "title": "GelecekBakım API", "version": "1.0.0", "description": "Çok kiracılı teknik servis, bakım ve depo API'si." },
  "servers": [{ "url": "https://gelecekbakim.pages.dev/api" }],
  "paths": {
    "/api-proxy": {
      "post": {
        "operationId": "gelecekBakimIslem",
        "summary": "Listeleme, CRUD veya güvenli iş eylemi çalıştırır",
        "security": [{ "apiKey": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Istek" } } } },
        "responses": { "200": { "description": "Başarılı" }, "400": { "description": "Geçersiz istek" }, "401": { "description": "Geçersiz anahtar" }, "403": { "description": "Yetki veya paket engeli" }, "429": { "description": "Kota aşıldı" } }
      }
    }
  },
  "components": {
    "securitySchemes": { "apiKey": { "type": "apiKey", "in": "header", "name": "X-GelecekBakim-Key" } },
    "schemas": {
      "Istek": {
        "type": "object",
        "required": ["islem"],
        "properties": {
          "islem": { "enum": ["durum", "liste", "ekle", "guncelle", "sil", "eylem"] },
          "alan": { "type": "string", "examples": ["makineler"] },
          "id": { "type": "string", "format": "uuid" },
          "kayit": { "type": "object", "additionalProperties": true },
          "filtreler": { "type": "object", "additionalProperties": { "type": ["string", "number", "boolean"] } },
          "limit": { "type": "integer", "minimum": 1, "maximum": 500 },
          "offset": { "type": "integer", "minimum": 0 },
          "eylem": { "type": "string", "examples": ["is_emri_durum_degistir"] },
          "parametreler": { "type": "object", "additionalProperties": true }
        }
      }
    }
  }
}
