basePath: / definitions: controllers.AdminUserUpdatePayload: properties: email: type: string is_admin: description: Pointer allows checking if field is present type: boolean username: type: string type: object controllers.AuthResponse: properties: access_token: type: string refresh_token: type: string user: $ref: '#/definitions/controllers.UserResponse' type: object controllers.CategoryPayload: properties: description: type: string parent_id: type: integer slug: type: string title: type: string required: - title type: object controllers.CategorySimple: properties: id: example: 1 type: integer parent_id: type: integer slug: example: news type: string title: example: News type: string type: object controllers.CategoryViewPayload: properties: category_id: type: integer ip_address: type: string required: - category_id type: object controllers.CategoryViewSimple: properties: category_id: example: 1 type: integer created_at: type: string id: example: 1 type: integer ip_address: example: 127.0.0.1 type: string type: object controllers.CommentPayload: properties: body: type: string post_id: type: integer user_id: type: integer required: - body - post_id - user_id type: object controllers.CommentSimple: properties: body: example: Nice post type: string created_at: type: string id: example: 1 type: integer post_id: example: 1 type: integer user_id: example: 2 type: integer type: object controllers.HeroListResponse: properties: items: items: $ref: '#/definitions/controllers.HeroResponse' type: array page: type: integer per_page: type: integer total: type: integer type: object controllers.HeroResponse: properties: color: example: '#ffffff' type: string created_at: type: string format: example: jpeg type: string height: example: 1080 type: integer id: example: 1 type: integer image: example: /uploads/heroes/img.jpg type: string is_active: type: boolean quality: example: 80 type: integer text1: example: Kısa açıklama type: string text2: example: İkinci metin type: string text4: example: Yardımcı metin type: string text5: example: Ek metin type: string title: example: Hero Başlık type: string updated_at: type: string width: example: 1920 type: integer type: object controllers.LoginPayload: properties: email: type: string password: type: string required: - email - password type: object controllers.PostListResponse: properties: items: items: $ref: '#/definitions/controllers.PostResponse' type: array page: type: integer per_page: type: integer total: type: integer type: object controllers.PostPayload: properties: category_ids: items: type: integer type: array content: type: string images: type: string slug: type: string tag_names: items: type: string type: array title: type: string required: - title type: object controllers.PostResponse: properties: categories: items: $ref: '#/definitions/controllers.CategorySimple' type: array content: type: string created_at: type: string id: example: 1 type: integer images: type: string slug: example: my-post-title type: string tags: items: $ref: '#/definitions/controllers.TagSimple' type: array title: example: My post title type: string updated_at: type: string type: object controllers.RefreshPayload: properties: refresh_token: type: string required: - refresh_token type: object controllers.RegisterPayload: properties: email: type: string password: minLength: 6 type: string username: type: string required: - email - password - username type: object controllers.SettingListResponse: properties: items: items: $ref: '#/definitions/controllers.SettingResponse' type: array page: type: integer per_page: type: integer total: type: integer type: object controllers.SettingResponse: properties: address: example: Adres örneği type: string b_format: type: string b_height: type: integer b_logo: type: string b_quality: type: integer b_width: type: integer copyright: example: © 2026 Example type: string created_at: type: string email: example: info@example.com type: string facebook: example: https://facebook.com/example type: string id: example: 1 type: integer instagram: example: https://instagram.com/example type: string is_active: type: boolean linkedin: example: https://linkedin.com/company/example type: string map_embed: type: string meta_description: example: Site açıklaması type: string meta_title: example: Meta Başlık type: string phone: example: ' +90 555 555 55 55' type: string pinterest: example: https://pinterest.com/example type: string slogan: example: En iyi içerik type: string title: example: Site Başlığı type: string updated_at: type: string url: example: https://example.com type: string w_format: type: string w_height: type: integer w_logo: type: string w_quality: type: integer w_width: description: image transform / metadata fields (match app/database/models/setting.go) type: integer whatsapp: example: https://wa.me/90555 type: string x: example: https://x.com/example type: string type: object controllers.TagPayload: properties: name: type: string required: - name type: object controllers.TagSimple: properties: id: example: 1 type: integer name: example: golang type: string type: object controllers.UserPayload: properties: email: type: string password: description: Opsiyonel şifre güncellemesi type: string username: type: string type: object controllers.UserResponse: properties: email: type: string email_verified: type: boolean id: type: integer is_admin: type: boolean username: type: string type: object host: localhost:8080 info: contact: {} description: API documentation for GoGin title: GoGin API version: "1.0" paths: /api/v1/admin/categories: get: description: Admin listing of categories. Use ?soft=only to list only deleted, ?soft=with to include deleted, omit to exclude deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List categories (supports soft-delete filter)' tags: - categories post: consumes: - application/json description: Create a new category (admin) parameters: - description: Category payload in: body name: category required: true schema: $ref: '#/definitions/controllers.CategoryPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.CategorySimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a category tags: - categories /api/v1/admin/categories/{id}: delete: description: Soft-delete a category (admin) parameters: - description: Category ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete a category tags: - categories put: consumes: - application/json description: Update an existing category (admin) parameters: - description: Category ID in: path name: id required: true type: integer - description: Category payload in: body name: category required: true schema: $ref: '#/definitions/controllers.CategoryPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.CategorySimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update a category tags: - categories /api/v1/admin/categories/{id}/posts: post: consumes: - application/json description: Create a post and attach it to the given category parameters: - description: Category ID in: path name: id required: true type: integer - description: Post payload in: body name: post required: true schema: $ref: '#/definitions/controllers.PostPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.PostResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Add a post to a category (admin) tags: - categories /api/v1/admin/categories/{id}/restore: post: description: Restore a category and related posts/comments if soft-deleted parameters: - description: Category ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.CategorySimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Restore a soft-deleted category tags: - categories /api/v1/admin/categories/deleted: get: description: List categories that have been soft-deleted with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: List soft-deleted categories tags: - categories /api/v1/admin/categoryviews: get: description: Admin listing of category views. Use ?soft=only to list only deleted, ?soft=with to include deleted, omit to exclude deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List category views (supports soft-delete filter)' tags: - categoryviews post: consumes: - application/json description: Create a category view as admin parameters: - description: CategoryView payload in: body name: view required: true schema: $ref: '#/definitions/controllers.CategoryViewPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.CategoryViewSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a category view (admin) tags: - categoryviews /api/v1/admin/comments: get: description: Admin listing of comments. Use ?soft=only to list only deleted, ?soft=with to include deleted, omit to exclude deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List comments (supports soft-delete filter)' tags: - comments post: consumes: - application/json description: Create a comment as admin parameters: - description: Comment payload in: body name: comment required: true schema: $ref: '#/definitions/controllers.CommentPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.CommentSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a comment (admin) tags: - comments /api/v1/admin/comments/{id}: delete: description: Soft-delete a comment as admin parameters: - description: Comment ID in: path name: id required: true type: integer produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete a comment (admin) tags: - comments put: consumes: - application/json description: Update a comment as admin parameters: - description: Comment ID in: path name: id required: true type: integer - description: Comment payload in: body name: comment required: true schema: $ref: '#/definitions/controllers.CommentPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.CommentSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update a comment (admin) tags: - comments /api/v1/admin/heroes: get: description: Admin listing of heroes. Use ?soft=only to list deleted, ?soft=with to include deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.HeroListResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List heroes' tags: - heroes post: consumes: - multipart/form-data description: Create a new hero item (multipart/form-data) parameters: - description: Color in: formData name: color required: true type: string - description: Title in: formData name: title type: string - description: Text1 in: formData name: text1 type: string - description: Text2 in: formData name: text2 type: string - description: Text4 in: formData name: text4 type: string - description: Text5 in: formData name: text5 type: string - description: Is Active in: formData name: is_active type: boolean - description: Image width (frontend-provided) in: formData name: width type: integer - description: Image height (frontend-provided) in: formData name: height type: integer - description: Image quality (frontend-provided) in: formData name: quality type: integer - description: Image format (jpeg|png|webp) (frontend-provided) in: formData name: format type: string - description: Image file in: formData name: image type: file produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.HeroResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Create a hero' tags: - heroes /api/v1/admin/heroes/{id}: delete: description: Soft-delete a hero by ID parameters: - description: Hero ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Delete a hero' tags: - heroes get: description: Return a single hero by id parameters: - description: Hero ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.HeroResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Get a hero by id' tags: - heroes put: consumes: - multipart/form-data description: Update an existing hero (multipart/form-data) parameters: - description: Hero ID in: path name: id required: true type: integer - description: Color in: formData name: color type: string - description: Title in: formData name: title type: string - description: Text1 in: formData name: text1 type: string - description: Text2 in: formData name: text2 type: string - description: Text4 in: formData name: text4 type: string - description: Text5 in: formData name: text5 type: string - description: Is Active in: formData name: is_active type: boolean - description: Image width (frontend-provided) in: formData name: width type: integer - description: Image height (frontend-provided) in: formData name: height type: integer - description: Image quality (frontend-provided) in: formData name: quality type: integer - description: Image format (jpeg|png|webp) (frontend-provided) in: formData name: format type: string - description: Image file in: formData name: image type: file produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.HeroResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Update a hero' tags: - heroes /api/v1/admin/heroes/{id}/restore: post: description: Restore a soft-deleted hero by ID parameters: - description: Hero ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.HeroResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Restore a soft-deleted hero' tags: - heroes /api/v1/admin/posts: get: description: Admin listing of posts. Use ?soft=only to list only deleted, ?soft=with to include deleted, omit to exclude deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: Filter by category id in: query name: category_id type: integer - description: Filter by tag id in: query name: tag_id type: integer - description: Search query in: query name: q type: string - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.PostListResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List posts (supports soft-delete filter)' tags: - posts post: consumes: - multipart/form-data description: Create a new blog post (supports multipart/form-data with image upload) parameters: - description: Title in: formData name: title required: true type: string - description: Slug in: formData name: slug type: string - description: Content in: formData name: content type: string - collectionFormat: csv description: Category IDs (repeatable) in: formData items: type: integer name: category_ids type: array - collectionFormat: csv description: Tag names (repeatable) in: formData items: type: string name: tag_names type: array - description: Image files (use 'images' or 'image' fields) in: formData name: images type: file - description: Image width in: formData name: width type: integer - description: Image height in: formData name: height type: integer - description: Image quality in: formData name: quality type: integer - description: Image format in: formData name: format type: string produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.PostResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a post tags: - posts /api/v1/admin/posts/{id}: delete: description: Delete a blog post by ID parameters: - description: Post ID in: path name: id required: true type: integer produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete a post tags: - posts put: consumes: - multipart/form-data description: Update an existing blog post (supports multipart/form-data with image upload) parameters: - description: Post ID in: path name: id required: true type: integer - description: Title in: formData name: title type: string - description: Slug in: formData name: slug type: string - description: Content in: formData name: content type: string - collectionFormat: csv description: Category IDs (repeatable) in: formData items: type: integer name: category_ids type: array - collectionFormat: csv description: Tag names (repeatable) in: formData items: type: string name: tag_names type: array - description: Image files (use 'images' or 'image' fields) in: formData name: images type: file - description: Image width in: formData name: width type: integer - description: Image height in: formData name: height type: integer - description: Image quality in: formData name: quality type: integer - description: Image format in: formData name: format type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.PostResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update a post tags: - posts /api/v1/admin/posts/{id}/comments: post: consumes: - application/json description: Add a comment to a specific post as admin parameters: - description: Post ID in: path name: id required: true type: integer - description: Comment payload in: body name: comment required: true schema: $ref: '#/definitions/controllers.CommentPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.CommentSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Add a comment to a post (admin) tags: - posts /api/v1/admin/posts/{id}/restore: post: description: Restore a post and its related comments (if soft-deleted) parameters: - description: Post ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.PostResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Restore a soft-deleted post tags: - posts /api/v1/admin/posts/deleted: get: description: List posts that have been soft-deleted with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.PostListResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: List soft-deleted posts tags: - posts /api/v1/admin/settings: get: description: Admin listing of settings. Use ?soft=only to list deleted, ?soft=with to include deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.SettingListResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List settings' tags: - settings post: consumes: - multipart/form-data description: Create a new setting parameters: - description: Title in: formData name: title required: true type: string - description: Meta title in: formData name: meta_title required: true type: string - description: Meta description in: formData name: meta_description required: true type: string - description: Phone in: formData name: phone required: true type: string - description: URL in: formData name: url required: true type: string - description: Email in: formData name: email required: true type: string - description: Facebook in: formData name: facebook type: string - description: X in: formData name: x type: string - description: Instagram in: formData name: instagram type: string - description: Whatsapp in: formData name: whatsapp type: string - description: Pinterest in: formData name: pinterest type: string - description: Linkedin in: formData name: linkedin type: string - description: Slogan in: formData name: slogan type: string - description: Address in: formData name: address type: string - description: Copyright in: formData name: copyright type: string - description: Map embed in: formData name: map_embed type: string - description: White logo file upload (or provide w_logo path as string) in: formData name: w_logo type: file - description: Black logo file upload (or provide b_logo path as string) in: formData name: b_logo type: file - description: Is active in: formData name: is_active type: boolean - description: W logo width in: formData name: w_width type: integer - description: W logo height in: formData name: w_height type: integer - description: W logo quality in: formData name: w_quality type: integer - description: W logo format in: formData name: w_format type: string - description: B logo width in: formData name: b_width type: integer - description: B logo height in: formData name: b_height type: integer - description: B logo quality in: formData name: b_quality type: integer - description: B logo format in: formData name: b_format type: string produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.SettingResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Create a setting' tags: - settings /api/v1/admin/settings/{id}: delete: description: Soft-delete a setting by ID parameters: - description: Setting ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Delete a setting' tags: - settings get: description: Return a single setting by id parameters: - description: Setting ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.SettingResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Get a setting by id' tags: - settings put: consumes: - multipart/form-data description: Update an existing setting parameters: - description: Setting ID in: path name: id required: true type: integer - description: Title in: formData name: title type: string - description: Meta title in: formData name: meta_title type: string - description: Meta description in: formData name: meta_description type: string - description: Phone in: formData name: phone type: string - description: URL in: formData name: url type: string - description: Email in: formData name: email type: string - description: Facebook in: formData name: facebook type: string - description: X in: formData name: x type: string - description: Instagram in: formData name: instagram type: string - description: Whatsapp in: formData name: whatsapp type: string - description: Pinterest in: formData name: pinterest type: string - description: Linkedin in: formData name: linkedin type: string - description: Slogan in: formData name: slogan type: string - description: Address in: formData name: address type: string - description: Copyright in: formData name: copyright type: string - description: Map embed in: formData name: map_embed type: string - description: White logo file upload (or provide w_logo path as string) in: formData name: w_logo type: file - description: Black logo file upload (or provide b_logo path as string) in: formData name: b_logo type: file - description: Is active in: formData name: is_active type: boolean - description: W logo width in: formData name: w_width type: integer - description: W logo height in: formData name: w_height type: integer - description: W logo quality in: formData name: w_quality type: integer - description: W logo format in: formData name: w_format type: string - description: B logo width in: formData name: b_width type: integer - description: B logo height in: formData name: b_height type: integer - description: B logo quality in: formData name: b_quality type: integer - description: B logo format in: formData name: b_format type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.SettingResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Update a setting' tags: - settings /api/v1/admin/settings/{id}/restore: post: description: Restore a soft-deleted setting by ID parameters: - description: Setting ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.SettingResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Restore a soft-deleted setting' tags: - settings /api/v1/admin/tags: get: description: Admin listing of tags. Use ?soft=only to list only deleted, ?soft=with to include deleted, omit to exclude deleted. parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: 'items: []AdminTagListItem (includes deleted_at when soft=only or soft=with)' schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List tags (supports soft-delete filter)' tags: - tags post: consumes: - application/json description: Create a new tag (admin) parameters: - description: Tag payload in: body name: tag required: true schema: $ref: '#/definitions/controllers.TagPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.TagSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a tag tags: - tags /api/v1/admin/tags/{id}: delete: description: Soft-delete a tag (admin) parameters: - description: Tag ID in: path name: id required: true type: integer produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete a tag tags: - tags put: consumes: - application/json description: Update an existing tag (admin) parameters: - description: Tag ID in: path name: id required: true type: integer - description: Tag payload in: body name: tag required: true schema: $ref: '#/definitions/controllers.TagPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.TagSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update a tag tags: - tags /api/v1/admin/tags/{id}/restore: post: description: Restore a tag that has been soft-deleted (admin) parameters: - description: Tag ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.TagSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Restore a soft-deleted tag tags: - tags /api/v1/admin/users: get: description: Admin listing of users with pagination and search parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: Search query (username or email) in: query name: q type: string - description: 'Soft delete filter: only|with' in: query name: soft type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: List users' tags: - users_admin /api/v1/admin/users/{id}: delete: description: Soft delete user parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Delete user' tags: - users_admin get: description: Get user details by ID parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.UserResponse' "404": description: Not Found schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Get user' tags: - users_admin put: consumes: - application/json description: Update user details (admin) parameters: - description: User ID in: path name: id required: true type: integer - description: User update payload in: body name: user required: true schema: $ref: '#/definitions/controllers.AdminUserUpdatePayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.UserResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Update user' tags: - users_admin /api/v1/admin/users/{id}/restore: post: description: Restore soft-deleted user parameters: - description: User ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.UserResponse' "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: 'Admin: Restore user' tags: - users_admin /api/v1/auth/github: get: description: Redirects to GitHub for authentication responses: "302": description: Found summary: GitHub OAuth2 Login tags: - auth /api/v1/auth/github/callback: get: description: Handles GitHub OAuth2 callback responses: "200": description: OK schema: $ref: '#/definitions/controllers.AuthResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: GitHub OAuth2 Callback tags: - auth /api/v1/auth/google: get: description: Redirects to Google for authentication responses: "302": description: Found summary: Google OAuth2 Login tags: - auth /api/v1/auth/google/callback: get: description: Handles Google OAuth2 callback responses: "200": description: OK schema: $ref: '#/definitions/controllers.AuthResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: Google OAuth2 Callback tags: - auth /api/v1/auth/login: post: consumes: - application/json description: Login with email and password, returns tokens parameters: - description: Login payload in: body name: login required: true schema: $ref: '#/definitions/controllers.LoginPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.AuthResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "401": description: Unauthorized schema: additionalProperties: type: string type: object summary: Login user tags: - auth /api/v1/auth/me: get: description: Get current authenticated user information produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "401": description: Unauthorized schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Get current user (me) tags: - auth /api/v1/auth/refresh: post: consumes: - application/json description: 'usage: send refresh token to get new access token and refresh token' parameters: - description: Refresh token payload in: body name: refresh required: true schema: $ref: '#/definitions/controllers.RefreshPayload' produces: - application/json responses: "200": description: Returns both access_token and refresh_token schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "401": description: Unauthorized schema: additionalProperties: type: string type: object summary: Refresh access token tags: - auth /api/v1/auth/register: post: consumes: - application/json description: Register a new user. Sends verification email. Does NOT return tokens. parameters: - description: Register payload in: body name: register required: true schema: $ref: '#/definitions/controllers.RegisterPayload' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/controllers.AuthResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: Register a new user tags: - auth /api/v1/auth/verify-email: get: consumes: - application/json description: Verify email using token parameters: - description: Verification Token in: query name: token required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object summary: Verify email address tags: - auth /api/v1/categories: get: description: List categories with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: List categories tags: - categories /api/v1/categoryviews: get: description: List category views with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: List category views tags: - categoryviews /api/v1/categoryviews/{id}: get: description: Return a single category view by id parameters: - description: CategoryView ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.CategoryViewSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object summary: Get a category view by id tags: - categoryviews /api/v1/comments: get: description: List comments with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: List comments tags: - comments /api/v1/comments/{id}: get: description: Return a single comment by id parameters: - description: Comment ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.CommentSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object summary: Get a comment by id tags: - comments /api/v1/heroes: get: description: Return active heroes with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.HeroListResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 'Public: List heroes' tags: - heroes /api/v1/heroes/{id}: get: description: Return a single hero by id parameters: - description: Hero ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.HeroResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object summary: 'Public: Get a hero by id' tags: - heroes /api/v1/posts: get: description: List posts with pagination and optional filters parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer - description: Filter by category id in: query name: category_id type: integer - description: Filter by tag id in: query name: tag_id type: integer - description: Search query in: query name: q type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.PostListResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: List posts tags: - posts /api/v1/posts/{slug}: get: description: Return a single post found by slug parameters: - description: Post slug in: path name: slug required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.PostResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object summary: Get a post by slug tags: - posts /api/v1/settings: get: description: Return the active site setting (latest active). If none active, return latest setting. produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.SettingResponse' "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: 'Public: Get site settings' tags: - settings /api/v1/tags: get: description: List tags with pagination parameters: - description: Page number in: query name: page type: integer - description: Items per page in: query name: per_page type: integer produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: List tags tags: - tags /api/v1/tags/{id}: get: description: Return a single tag by id parameters: - description: Tag ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.TagSimple' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object summary: Get a tag by id tags: - tags /api/v1/users/profile: get: description: Get profile of the logged-in user produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.UserResponse' "401": description: Unauthorized schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Get current user profile tags: - users put: consumes: - application/json description: Update profile of the logged-in user parameters: - description: User update payload in: body name: user required: true schema: $ref: '#/definitions/controllers.UserPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/controllers.UserResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update current user profile tags: - users securityDefinitions: BearerAuth: description: Enter your JWT token (include "Bearer " prefix, e.g., "Bearer ") in: header name: Authorization type: apiKey swagger: "2.0"