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