{ "schemes": [ "https" ], "swagger": "2.0", "info": { "description": "GinImage API dokumantasyonu. Legacy access token formatlari desteklenmez.", "title": "Gin Image API", "contact": {}, "version": "1.0" }, "host": "mcp.beyhano.net.tr", "paths": { "/api/v1/admin/tokens/issue": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Sadece admin rolü için, istekle verilen gün kadar geçerli access token üretir. Refresh token üretilmez.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin için gün bazlı access token üretir", "parameters": [ { "description": "Token süresi (gün)", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.AdminIssueTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminIssueTokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/admin/users": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin kullanicilari listeler", "parameters": [ { "type": "integer", "default": 1, "description": "Sayfa numarasi", "name": "page", "in": "query" }, { "type": "integer", "default": 10, "description": "Sayfa boyutu (max 100)", "name": "limit", "in": "query" }, { "type": "string", "description": "Kullanici adi/email arama", "name": "search", "in": "query" }, { "type": "boolean", "description": "Admin filtresi", "name": "is_admin", "in": "query" }, { "type": "boolean", "description": "Aktiflik filtresi", "name": "is_active", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminUserListResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullanici olusturur", "parameters": [ { "description": "Kullanici olusturma verisi", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.AdminCreateUserRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.AdminUserResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/admin/users/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullanici detayi getirir", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminUserResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullaniciyi gunceller", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true }, { "description": "Kullanici guncelleme verisi", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.AdminUpdateUserRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminUserResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullanici siler", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.MessageResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/admin/users/{id}/profile": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullanicinin profilini getirir", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminProfileResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullanici profilini gunceller", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Ad", "name": "first_name", "in": "formData" }, { "type": "string", "description": "Soyad", "name": "last_name", "in": "formData" }, { "type": "file", "description": "Avatar dosyasi", "name": "avatar", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminProfileResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/admin/users/{id}/status": { "patch": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "admin-users" ], "summary": "Admin panel icin kullanici aktiflik durumunu gunceller", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true }, { "description": "Durum verisi", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.AdminUserStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.AdminUserResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/auth/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Kullanici girisi yapar", "parameters": [ { "description": "Giris verisi", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/auth/refresh": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Refresh token ile yeni token uretir", "parameters": [ { "description": "Refresh token", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.RefreshRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/auth/register": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Kullanici kaydi olusturur", "parameters": [ { "description": "Kayit verisi", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.RegisterRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.RegisterResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/auth/social/github": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "GitHub access token ile giris veya kayit yapar", "parameters": [ { "description": "GitHub access token", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SocialLoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SocialTokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/auth/social/google": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "Google access token ile giris veya kayit yapar", "parameters": [ { "description": "Google access token", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SocialLoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SocialTokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/auth/verify-email": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "E-posta dogrulama tokeni ile hesabi aktif eder", "parameters": [ { "type": "string", "description": "Dogrulama tokeni", "name": "token", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.TokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/blogs": { "get": { "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Public blog post listesini getirir", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogListResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Admin blog post olusturur", "parameters": [ { "description": "Post bilgileri", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.createPostRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.BlogPostResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/categories": { "get": { "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Public kategori listesini getirir", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogCategoryListResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Admin kategori olusturur", "parameters": [ { "description": "Kategori bilgileri", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.createCategoryRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.BlogCategoryResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/categories/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Admin kategori gunceller", "parameters": [ { "type": "integer", "description": "Kategori ID", "name": "id", "in": "path", "required": true }, { "description": "Guncellenecek alanlar", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updateCategoryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogCategoryResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "tags": [ "blogs" ], "summary": "Admin kategori siler", "parameters": [ { "type": "integer", "description": "Kategori ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/categories/{slug}": { "get": { "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Public tekil kategori getirir", "parameters": [ { "type": "string", "description": "Kategori slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogCategoryResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/tags": { "get": { "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Public tag listesini getirir", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogTagListResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Admin tag olusturur", "parameters": [ { "description": "Tag bilgileri", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.createTagRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.BlogTagResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/tags/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Admin tag gunceller", "parameters": [ { "type": "integer", "description": "Tag ID", "name": "id", "in": "path", "required": true }, { "description": "Guncellenecek alanlar", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updateTagRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogTagResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "tags": [ "blogs" ], "summary": "Admin tag siler", "parameters": [ { "type": "integer", "description": "Tag ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/tags/{slug}": { "get": { "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Public tekil tag getirir", "parameters": [ { "type": "string", "description": "Tag slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogTagResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Admin blog post gunceller", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true }, { "description": "Guncellenecek alanlar", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.updatePostRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogPostResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "tags": [ "blogs" ], "summary": "Admin blog post siler", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/blogs/{slug}": { "get": { "produces": [ "application/json" ], "tags": [ "blogs" ], "summary": "Public tekil blog postu getirir", "parameters": [ { "type": "string", "description": "Post slug", "name": "slug", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.BlogPostResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.BlogErrorResponse" } } } } }, "/api/v1/images": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "images" ], "summary": "Giris yapan kullanicinin kayitli resimlerini listeler", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ListImagesResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } } } } }, "/api/v1/images/process": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "images" ], "summary": "Resmi en, boy, kalite ve formata gore isler", "parameters": [ { "type": "file", "description": "Yuklenecek resim", "name": "file", "in": "formData", "required": true }, { "type": "integer", "description": "Hedef genislik (default: orijinal)", "name": "width", "in": "formData" }, { "type": "integer", "description": "Hedef yukseklik (default: orijinal)", "name": "height", "in": "formData" }, { "type": "integer", "description": "Kalite 1-100 (default: 90)", "name": "quality", "in": "formData" }, { "type": "string", "description": "avif|webp|png|jpg|jpeg (default: avif)", "name": "format", "in": "formData" }, { "type": "boolean", "description": "true ise cover crop uygular", "name": "cover", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ProcessImageResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } } } } }, "/api/v1/images/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "images" ], "summary": "Giris yapan kullanicinin tekil resim kaydini getirir", "parameters": [ { "type": "integer", "description": "Image ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ImageRecordResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ImageErrorResponse" } } } } }, "/api/v1/mcp": { "post": { "security": [ { "BearerAuth": [] } ], "description": "MCP isteklerini JSON-RPC 2.0 formatinda kabul eder.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "MCP JSON-RPC endpoint", "parameters": [ { "description": "MCP JSON-RPC request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/mcp.HTTPRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/mcp.HTTPResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/mcp.HTTPResponse" } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "description": "Stateless MCP server icin session teardown desteklenmez, 405 doner.", "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "MCP streamable DELETE endpoint", "responses": { "405": { "description": "Method Not Allowed", "schema": { "type": "string" } } } } }, "/api/v1/mcp/guides/upload": { "post": { "security": [ { "BearerAuth": [] } ], "description": "`.md` dosyasini `docs/mcp-tools` altina kaydeder ve MCP tool'lari tarafindan okunabilir hale getirir.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "mcp" ], "summary": "MCP markdown rehberi yukler", "parameters": [ { "type": "file", "description": "Yuklenecek markdown dosyasi", "name": "file", "in": "formData", "required": true }, { "type": "boolean", "description": "Ayni isimli dosya varsa uzerine yazilsin mi? (default: false)", "name": "overwrite", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/mcp.UploadGuideResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/mcp.UploadGuideErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/mcp.UploadGuideErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/mcp.UploadGuideErrorResponse" } } } } }, "/api/v1/me": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Giris yapan kullanicinin bilgilerini doner", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.MeResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/me/profile": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Giris yapan kullanicinin profilini getirir", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ProfileResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Giris yapan kullanicinin profilini gunceller", "parameters": [ { "type": "string", "description": "Ad", "name": "first_name", "in": "formData" }, { "type": "string", "description": "Soyad", "name": "last_name", "in": "formData" }, { "type": "file", "description": "Avatar dosyasi", "name": "avatar", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ProfileResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/api/v1/users/{id}/admin": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Kullanicinin admin yetkisini gunceller", "parameters": [ { "type": "integer", "description": "Kullanici ID", "name": "id", "in": "path", "required": true }, { "description": "Admin durumu", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.adminRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.MessageResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } } }, "definitions": { "handlers.AdminCreateUserRequest": { "type": "object", "required": [ "confirm_password", "email", "password", "username" ], "properties": { "confirm_password": { "type": "string" }, "email": { "type": "string" }, "is_active": { "type": "boolean" }, "is_admin": { "type": "boolean" }, "password": { "type": "string", "minLength": 6 }, "username": { "type": "string", "minLength": 3 } } }, "handlers.AdminIssueTokenRequest": { "type": "object", "required": [ "duration_days" ], "properties": { "duration_days": { "type": "integer", "maximum": 365, "minimum": 1 } } }, "handlers.AdminIssueTokenResponse": { "type": "object", "properties": { "access": { "type": "string" }, "expires_at": { "type": "string" } } }, "handlers.AdminProfileResponse": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "user_id": { "type": "integer" } } }, "handlers.AdminUpdateUserRequest": { "type": "object", "properties": { "email": { "type": "string" }, "is_active": { "type": "boolean" }, "is_admin": { "type": "boolean" }, "password": { "type": "string", "minLength": 6 }, "username": { "type": "string", "minLength": 3 } } }, "handlers.AdminUserListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/handlers.adminUserResponse" } }, "meta": { "$ref": "#/definitions/handlers.paginationMeta" } } }, "handlers.AdminUserResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "id": { "type": "integer" }, "is_active": { "type": "boolean" }, "is_admin": { "type": "boolean" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "handlers.AdminUserStatusRequest": { "type": "object", "required": [ "is_active" ], "properties": { "is_active": { "type": "boolean" } } }, "handlers.BlogCategoryListResponse": { "type": "object", "properties": { "count": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/handlers.BlogCategoryResponse" } } } }, "handlers.BlogCategoryResponse": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "is_active": { "type": "boolean" }, "keywords": { "type": "string" }, "order": { "type": "integer" }, "slug": { "type": "string" }, "title": { "type": "string" } } }, "handlers.BlogErrorResponse": { "type": "object", "properties": { "error": { "type": "string" } } }, "handlers.BlogListResponse": { "type": "object", "properties": { "count": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/handlers.BlogPostResponse" } } } }, "handlers.BlogPostResponse": { "type": "object", "properties": { "content": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "image": { "type": "string" }, "is_active": { "type": "boolean" }, "is_front": { "type": "boolean" }, "keywords": { "type": "string" }, "slug": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string" }, "video": { "type": "string" } } }, "handlers.BlogTagListResponse": { "type": "object", "properties": { "count": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/handlers.BlogTagResponse" } } } }, "handlers.BlogTagResponse": { "type": "object", "properties": { "id": { "type": "integer" }, "is_active": { "type": "boolean" }, "slug": { "type": "string" }, "tag": { "type": "string" } } }, "handlers.ErrorResponse": { "type": "object", "properties": { "error": { "type": "string" } } }, "handlers.ImageErrorResponse": { "type": "object", "properties": { "error": { "type": "string" } } }, "handlers.ImageRecordResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "file_name": { "type": "string" }, "format": { "type": "string" }, "height": { "type": "integer" }, "id": { "type": "integer" }, "mime_type": { "type": "string" }, "mode": { "type": "string" }, "public_path": { "type": "string" }, "quality": { "type": "integer" }, "size": { "type": "integer" }, "url": { "type": "string" }, "width": { "type": "integer" } } }, "handlers.ListImagesResponse": { "type": "object", "properties": { "count": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/handlers.ImageRecordResponse" } } } }, "handlers.LoginRequest": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "handlers.MeResponse": { "type": "object", "properties": { "email": { "type": "string" }, "user_id": {}, "username": { "type": "string" } } }, "handlers.MessageResponse": { "type": "object", "properties": { "message": { "type": "string" } } }, "handlers.ProcessImageResponse": { "type": "object", "properties": { "file_name": { "type": "string" }, "format": { "type": "string" }, "height": { "type": "integer" }, "message": { "type": "string" }, "mime_type": { "type": "string" }, "public_path": { "type": "string" }, "quality": { "type": "integer" }, "size": { "type": "integer" }, "url": { "type": "string" }, "width": { "type": "integer" } } }, "handlers.ProfileResponse": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "user_id": { "type": "integer" } } }, "handlers.RefreshRequest": { "type": "object", "properties": { "refresh_token": { "type": "string" } } }, "handlers.RegisterRequest": { "type": "object", "properties": { "confirm_password": { "type": "string" }, "email": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "password": { "type": "string" }, "username": { "type": "string" } } }, "handlers.RegisterResponse": { "type": "object", "properties": { "message": { "type": "string" }, "verification_token": { "type": "string" }, "verification_url": { "type": "string" } } }, "handlers.SocialLoginRequest": { "type": "object", "properties": { "access_token": { "type": "string" } } }, "handlers.SocialTokenResponse": { "type": "object", "properties": { "access": { "type": "string" }, "message": { "type": "string" }, "new_user": { "type": "boolean" }, "provider": { "type": "string" }, "refresh": { "type": "string" } } }, "handlers.TokenResponse": { "type": "object", "properties": { "access": { "description": "JWT (HS256) access token", "type": "string" }, "refresh": { "description": "JWT (HS256) refresh token", "type": "string" } } }, "handlers.adminRequest": { "type": "object", "properties": { "is_admin": { "type": "boolean" } } }, "handlers.adminUserResponse": { "type": "object", "properties": { "created_at": { "type": "string" }, "email": { "type": "string" }, "email_verified": { "type": "boolean" }, "id": { "type": "integer" }, "is_active": { "type": "boolean" }, "is_admin": { "type": "boolean" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "handlers.createCategoryRequest": { "type": "object", "required": [ "title" ], "properties": { "description": { "type": "string" }, "image": { "type": "string" }, "is_active": { "type": "boolean" }, "keywords": { "type": "string" }, "order": { "type": "integer" }, "parent_id": { "type": "integer" }, "title": { "type": "string", "minLength": 2 } } }, "handlers.createPostRequest": { "type": "object", "required": [ "title" ], "properties": { "content": { "type": "string" }, "image": { "type": "string" }, "is_active": { "type": "boolean" }, "is_front": { "type": "boolean" }, "keywords": { "type": "string" }, "title": { "type": "string", "minLength": 3 }, "video": { "type": "string" } } }, "handlers.createTagRequest": { "type": "object", "required": [ "tag" ], "properties": { "is_active": { "type": "boolean" }, "tag": { "type": "string", "minLength": 2 } } }, "handlers.paginationMeta": { "type": "object", "properties": { "limit": { "type": "integer" }, "page": { "type": "integer" }, "total": { "type": "integer" } } }, "handlers.updateCategoryRequest": { "type": "object", "properties": { "description": { "type": "string" }, "image": { "type": "string" }, "is_active": { "type": "boolean" }, "keywords": { "type": "string" }, "order": { "type": "integer" }, "parent_id": { "type": "integer" }, "title": { "type": "string" } } }, "handlers.updatePostRequest": { "type": "object", "properties": { "content": { "type": "string" }, "image": { "type": "string" }, "is_active": { "type": "boolean" }, "is_front": { "type": "boolean" }, "keywords": { "type": "string" }, "title": { "type": "string" }, "video": { "type": "string" } } }, "handlers.updateTagRequest": { "type": "object", "properties": { "is_active": { "type": "boolean" }, "tag": { "type": "string" } } }, "mcp.HTTPRequest": { "type": "object", "properties": { "id": { "type": "object" }, "jsonrpc": { "type": "string", "example": "2.0" }, "method": { "type": "string", "example": "tools/list" }, "params": { "type": "object", "additionalProperties": true } } }, "mcp.HTTPResponse": { "type": "object", "properties": { "error": { "type": "object", "additionalProperties": true }, "id": { "type": "object" }, "jsonrpc": { "type": "string", "example": "2.0" }, "result": { "type": "object", "additionalProperties": true } } }, "mcp.UploadGuideErrorResponse": { "type": "object", "properties": { "error": { "type": "string", "example": "file must be a markdown (.md) file" } } }, "mcp.UploadGuideResponse": { "type": "object", "properties": { "guide": { "type": "string", "example": "my-guide.md" }, "message": { "type": "string", "example": "markdown guide uploaded" }, "path": { "type": "string", "example": "docs/mcp-tools/my-guide.md" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }