{ "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "This is a sample server for AreS Fiber API.", "title": "AreS Fiber API Server", "termsOfService": "http://swagger.io/terms/", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "host": "localhost:8080", "basePath": "/", "paths": { "/api/v1/admin/categories": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "List categories (admin) with optional trashed filter", "parameters": [ { "type": "string", "description": "Trash filter: none|only|with", "name": "trashed", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/categories/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Permanently delete a category (admin only)", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/categories/{id}/restore": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Restore soft-deleted category (admin only)", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/category-views": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "CategoryViews" ], "summary": "List category views (admin) with optional trashed filter", "parameters": [ { "type": "string", "description": "Trash filter: none|only|with", "name": "trashed", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/category-views/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "CategoryViews" ], "summary": "Permanently delete a category view (admin only)", "parameters": [ { "type": "integer", "description": "CategoryView ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/category-views/{id}/restore": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "CategoryViews" ], "summary": "Restore soft-deleted category view (admin only)", "parameters": [ { "type": "integer", "description": "CategoryView ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/cors/blacklist": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "List CORS blacklists (admin only)", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Create CORS blacklist (admin only)", "parameters": [ { "description": "Blacklist payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.CorsBlacklistRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/cors/blacklist/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Update CORS blacklist (admin only)", "parameters": [ { "type": "integer", "description": "Blacklist ID", "name": "id", "in": "path", "required": true }, { "description": "Blacklist payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.CorsBlacklistRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Soft delete CORS blacklist (admin only)", "parameters": [ { "type": "integer", "description": "Blacklist ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/cors/blacklist/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Hard delete CORS blacklist (admin only)", "parameters": [ { "type": "integer", "description": "Blacklist ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/cors/whitelist": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "List CORS whitelists (admin only)", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Create CORS whitelist (admin only)", "parameters": [ { "description": "Whitelist payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.CorsWhitelistRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/cors/whitelist/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Update CORS whitelist (admin only)", "parameters": [ { "type": "integer", "description": "Whitelist ID", "name": "id", "in": "path", "required": true }, { "description": "Whitelist payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.CorsWhitelistRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Soft delete CORS whitelist (admin only)", "parameters": [ { "type": "integer", "description": "Whitelist ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/cors/whitelist/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Hard delete CORS whitelist (admin only)", "parameters": [ { "type": "integer", "description": "Whitelist ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/posts": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "List posts (admin) with optional trashed filter", "parameters": [ { "type": "string", "description": "Trash filter: none|only|with", "name": "trashed", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/posts/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Permanently delete a post (admin only)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/posts/{id}/restore": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Restore soft-deleted post (admin only)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/rate-limit": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "List rate limit settings (admin only)", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Create rate limit setting (admin only)", "parameters": [ { "description": "Rate limit payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.RateLimitSettingRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/rate-limit/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Update rate limit setting (admin only)", "parameters": [ { "type": "integer", "description": "Rate limit ID", "name": "id", "in": "path", "required": true }, { "description": "Rate limit payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.RateLimitSettingRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Soft delete rate limit setting (admin only)", "parameters": [ { "type": "integer", "description": "Rate limit ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/rate-limit/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Admin Security" ], "summary": "Hard delete rate limit setting (admin only)", "parameters": [ { "type": "integer", "description": "Rate limit ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/tags": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "List tags (admin) with optional trashed filter", "parameters": [ { "type": "string", "description": "Trash filter: none|only|with", "name": "trashed", "in": "query" }, { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/tags/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "Permanently delete a tag (admin only)", "parameters": [ { "type": "integer", "description": "Tag ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/admin/tags/{id}/restore": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "Restore soft-deleted tag (admin only)", "parameters": [ { "type": "integer", "description": "Tag ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/admin/example": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Admin-only sample endpoint", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Login user", "parameters": [ { "description": "Login payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/me": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Get current user from token", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/refresh": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Refresh access token", "parameters": [ { "description": "Refresh payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.RefreshRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/register": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Register user", "parameters": [ { "description": "Register payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.RegisterRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/resend-verification": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Resend verification email", "parameters": [ { "description": "Resend verification payload", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.ResendVerificationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/user/example": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Normal-user-only sample endpoint", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/auth/verify-email": { "get": { "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "Verify email address with token", "parameters": [ { "type": "string", "description": "Email verify token", "name": "token", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/categories": { "get": { "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "List categories (public)", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryDoc" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Create category (admin only)", "parameters": [ { "description": "Category payload", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.CreateCategoryRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.CategoryDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/categories/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Get single category (public)", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CategoryDoc" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Update category (admin only)", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true }, { "description": "Category payload", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.UpdateCategoryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CategoryDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Categories" ], "summary": "Delete category (admin only)", "parameters": [ { "type": "integer", "description": "Category ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/comments": { "get": { "produces": [ "application/json" ], "tags": [ "Comments" ], "summary": "List comments for a post (public)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "post_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.CommentDoc" } } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Comments" ], "summary": "Create comment (public)", "parameters": [ { "description": "Comment payload", "name": "data", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.CommentDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/comments/{id}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Comments" ], "summary": "Delete comment (admin only)", "parameters": [ { "type": "integer", "description": "Comment ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/hero": { "get": { "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Get active hero/banner", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Create new hero/banner (admin only)", "parameters": [ { "type": "string", "description": "Title", "name": "title", "in": "formData" }, { "type": "string", "description": "Text1", "name": "text1", "in": "formData" }, { "type": "string", "description": "Text2", "name": "text2", "in": "formData" }, { "type": "string", "description": "Text4", "name": "text4", "in": "formData" }, { "type": "string", "description": "Text5", "name": "text5", "in": "formData" }, { "type": "string", "description": "Color", "name": "color", "in": "formData", "required": true }, { "type": "boolean", "description": "Is Active", "name": "is_active", "in": "formData" }, { "type": "file", "description": "Hero Image", "name": "image", "in": "formData", "required": true } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/hero/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Update hero/banner (admin only)", "parameters": [ { "type": "integer", "description": "Hero ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Title", "name": "title", "in": "formData" }, { "type": "string", "description": "Text1", "name": "text1", "in": "formData" }, { "type": "string", "description": "Text2", "name": "text2", "in": "formData" }, { "type": "string", "description": "Text4", "name": "text4", "in": "formData" }, { "type": "string", "description": "Text5", "name": "text5", "in": "formData" }, { "type": "string", "description": "Color", "name": "color", "in": "formData" }, { "type": "boolean", "description": "Is Active", "name": "is_active", "in": "formData" }, { "type": "file", "description": "Hero Image", "name": "image", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Delete hero/banner (admin only)", "parameters": [ { "type": "integer", "description": "Hero ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/heroes": { "get": { "description": "Returns all hero/banner records (no filter)", "produces": [ "application/json" ], "tags": [ "Hero" ], "summary": "Get all heroes", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/posts": { "get": { "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "List posts (public) with pagination", "parameters": [ { "type": "integer", "description": "Page number", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page", "name": "per_page", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Create a post (admin only)", "parameters": [ { "type": "string", "description": "Title", "name": "title", "in": "formData", "required": true }, { "type": "string", "description": "Content", "name": "content", "in": "formData" }, { "type": "string", "description": "Comma separated category ids", "name": "category_ids", "in": "formData" }, { "type": "string", "description": "Comma separated tag ids", "name": "tag_ids", "in": "formData" }, { "type": "file", "description": "Images (multiple allowed)", "name": "images", "in": "formData" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.PostDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/posts/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Get single post (public)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.PostDoc" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Update a post (admin only)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Title", "name": "title", "in": "formData" }, { "type": "string", "description": "Content", "name": "content", "in": "formData" }, { "type": "string", "description": "Comma separated category ids", "name": "category_ids", "in": "formData" }, { "type": "string", "description": "Comma separated tag ids", "name": "tag_ids", "in": "formData" }, { "type": "file", "description": "Images (multiple allowed)", "name": "images", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.PostDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Posts" ], "summary": "Delete a post (admin only)", "parameters": [ { "type": "integer", "description": "Post ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/setting": { "get": { "produces": [ "application/json" ], "tags": [ "Setting" ], "summary": "Get site settings", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Setting" ], "summary": "Create new site setting (admin only)", "parameters": [ { "type": "string", "description": "Title", "name": "title", "in": "formData", "required": true }, { "type": "string", "description": "Meta Title", "name": "meta_title", "in": "formData", "required": true }, { "type": "string", "description": "Meta Description", "name": "meta_description", "in": "formData", "required": true }, { "type": "string", "description": "Phone", "name": "phone", "in": "formData", "required": true }, { "type": "string", "description": "URL", "name": "url", "in": "formData", "required": true }, { "type": "string", "description": "Email", "name": "email", "in": "formData", "required": true }, { "type": "string", "description": "Facebook", "name": "facebook", "in": "formData" }, { "type": "string", "description": "X", "name": "x", "in": "formData" }, { "type": "string", "description": "Instagram", "name": "instagram", "in": "formData" }, { "type": "string", "description": "Whatsapp", "name": "whatsapp", "in": "formData" }, { "type": "string", "description": "Pinterest", "name": "pinterest", "in": "formData" }, { "type": "string", "description": "Linkedin", "name": "linkedin", "in": "formData" }, { "type": "string", "description": "Slogan", "name": "slogan", "in": "formData" }, { "type": "string", "description": "Address", "name": "address", "in": "formData" }, { "type": "string", "description": "Copyright", "name": "copyright", "in": "formData" }, { "type": "string", "description": "Map Embed", "name": "map_embed", "in": "formData" }, { "type": "boolean", "description": "Is Active", "name": "is_active", "in": "formData" }, { "type": "file", "description": "White Logo", "name": "w_logo", "in": "formData" }, { "type": "file", "description": "Black Logo", "name": "b_logo", "in": "formData" } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/setting/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Setting" ], "summary": "Update site setting (admin only)", "parameters": [ { "type": "integer", "description": "Setting ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Title", "name": "title", "in": "formData" }, { "type": "string", "description": "Meta Title", "name": "meta_title", "in": "formData" }, { "type": "string", "description": "Meta Description", "name": "meta_description", "in": "formData" }, { "type": "string", "description": "Phone", "name": "phone", "in": "formData" }, { "type": "string", "description": "URL", "name": "url", "in": "formData" }, { "type": "string", "description": "Email", "name": "email", "in": "formData" }, { "type": "string", "description": "Facebook", "name": "facebook", "in": "formData" }, { "type": "string", "description": "X", "name": "x", "in": "formData" }, { "type": "string", "description": "Instagram", "name": "instagram", "in": "formData" }, { "type": "string", "description": "Whatsapp", "name": "whatsapp", "in": "formData" }, { "type": "string", "description": "Pinterest", "name": "pinterest", "in": "formData" }, { "type": "string", "description": "Linkedin", "name": "linkedin", "in": "formData" }, { "type": "string", "description": "Slogan", "name": "slogan", "in": "formData" }, { "type": "string", "description": "Address", "name": "address", "in": "formData" }, { "type": "string", "description": "Copyright", "name": "copyright", "in": "formData" }, { "type": "string", "description": "Map Embed", "name": "map_embed", "in": "formData" }, { "type": "boolean", "description": "Is Active", "name": "is_active", "in": "formData" }, { "type": "file", "description": "White Logo", "name": "w_logo", "in": "formData" }, { "type": "file", "description": "Black Logo", "name": "b_logo", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Setting" ], "summary": "Delete site setting (admin only)", "parameters": [ { "type": "integer", "description": "Setting ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/tags": { "get": { "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "List tags (public)", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.TagDoc" } } } } }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "Create tag (admin only)", "parameters": [ { "description": "Tag payload", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.CreateTagRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.TagDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/tags/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "Update tag (admin only)", "parameters": [ { "type": "integer", "description": "Tag ID", "name": "id", "in": "path", "required": true }, { "description": "Tag payload", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/controllers.UpdateTagRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.TagDoc" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Tags" ], "summary": "Delete tag (admin only)", "parameters": [ { "type": "integer", "description": "Tag ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/users/list": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "List active users (admin only)", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/users/list/deleted": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "List soft-deleted users (admin only)", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/users/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Update user (admin only)", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Username", "name": "username", "in": "formData" }, { "type": "string", "description": "Email", "name": "email", "in": "formData" }, { "type": "boolean", "description": "Is Admin", "name": "is_admin", "in": "formData" }, { "type": "string", "description": "Password", "name": "password", "in": "formData" }, { "type": "string", "description": "First Name", "name": "first_name", "in": "formData" }, { "type": "string", "description": "Last Name", "name": "last_name", "in": "formData" }, { "type": "boolean", "description": "Email Verified", "name": "email_verified", "in": "formData" }, { "type": "file", "description": "Avatar Image", "name": "avatar", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Soft delete user (admin only)", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/users/{id}/hard": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Hard delete user permanently (admin only)", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/v1/users/{id}/restore": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Restore soft-deleted user (admin only)", "parameters": [ { "type": "integer", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "definitions": { "controllers.CorsBlacklistRequest": { "type": "object", "required": [ "origin" ], "properties": { "is_active": { "type": "boolean" }, "origin": { "type": "string" }, "reason": { "type": "string" } } }, "controllers.CorsWhitelistRequest": { "type": "object", "required": [ "origin" ], "properties": { "description": { "type": "string" }, "is_active": { "type": "boolean" }, "origin": { "type": "string" } } }, "controllers.CreateCategoryRequest": { "type": "object", "required": [ "title" ], "properties": { "description": { "type": "string" }, "parent_id": { "type": "integer" }, "title": { "type": "string", "minLength": 2 } } }, "controllers.CreateTagRequest": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "minLength": 1 } } }, "controllers.LoginRequest": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "controllers.RateLimitSettingRequest": { "type": "object", "required": [ "max_requests", "name", "window_seconds" ], "properties": { "description": { "type": "string" }, "is_active": { "type": "boolean" }, "max_requests": { "type": "integer", "minimum": 1 }, "name": { "type": "string" }, "window_seconds": { "type": "integer", "minimum": 1 } } }, "controllers.RefreshRequest": { "type": "object", "required": [ "refresh_token" ], "properties": { "refresh_token": { "type": "string" } } }, "controllers.RegisterRequest": { "type": "object", "required": [ "email", "first_name", "last_name", "password", "username" ], "properties": { "email": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "password": { "type": "string", "minLength": 6 }, "username": { "type": "string", "minLength": 3 } } }, "controllers.ResendVerificationRequest": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } } }, "controllers.UpdateCategoryRequest": { "type": "object", "properties": { "description": { "type": "string" }, "parent_id": { "type": "integer" }, "title": { "type": "string", "minLength": 2 } } }, "controllers.UpdateTagRequest": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 } } }, "models.CategoryDoc": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryDoc" } }, "description": { "type": "string" }, "id": { "type": "integer" }, "parent_id": { "type": "integer" }, "title": { "type": "string" } } }, "models.CommentDoc": { "type": "object", "properties": { "body": { "type": "string" }, "id": { "type": "integer" }, "post_id": { "type": "integer" }, "user_id": { "type": "integer" } } }, "models.PostDoc": { "type": "object", "properties": { "categories": { "type": "array", "items": { "$ref": "#/definitions/models.CategoryDoc" } }, "content": { "type": "string" }, "id": { "type": "integer" }, "images": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/models.TagDoc" } }, "title": { "type": "string" } } }, "models.TagDoc": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "description": "Type \"Bearer\" followed by a space and JWT token.", "type": "apiKey", "name": "Authorization", "in": "header" } } }