Regenerate Swagger for public file GET and user branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 14:29:52 +05:00
parent 9c07439089
commit 2853bed2ec
3 changed files with 71 additions and 45 deletions

View File

@@ -1597,14 +1597,9 @@ const docTemplate = `{
}
}
},
"/file/{id}": {
"/file/{file_name}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "download file",
"description": "download file by object name (public; not under /api/admin)",
"produces": [
"application/octet-stream"
],
@@ -1615,7 +1610,7 @@ const docTemplate = `{
{
"type": "string",
"description": "object name",
"name": "id",
"name": "file_name",
"in": "path",
"required": true
}
@@ -1627,6 +1622,18 @@ const docTemplate = `{
"type": "file"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
@@ -1634,7 +1641,9 @@ const docTemplate = `{
}
}
}
},
}
},
"/file/{id}": {
"delete": {
"security": [
{
@@ -5557,7 +5566,7 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns a single user",
"description": "Returns a single user with assigned branches",
"produces": [
"application/json"
],

View File

@@ -1591,14 +1591,9 @@
}
}
},
"/file/{id}": {
"/file/{file_name}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "download file",
"description": "download file by object name (public; not under /api/admin)",
"produces": [
"application/octet-stream"
],
@@ -1609,7 +1604,7 @@
{
"type": "string",
"description": "object name",
"name": "id",
"name": "file_name",
"in": "path",
"required": true
}
@@ -1621,6 +1616,18 @@
"type": "file"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
@@ -1628,7 +1635,9 @@
}
}
}
},
}
},
"/file/{id}": {
"delete": {
"security": [
{
@@ -5551,7 +5560,7 @@
"BearerAuth": []
}
],
"description": "Returns a single user",
"description": "Returns a single user with assigned branches",
"produces": [
"application/json"
],

View File

@@ -2274,6 +2274,36 @@ paths:
- BearerAuth: []
tags:
- file-upload
/file/{file_name}:
get:
description: download file by object name (public; not under /api/admin)
parameters:
- description: object name
in: path
name: file_name
required: true
type: string
produces:
- application/octet-stream
responses:
"200":
description: OK
schema:
type: file
"400":
description: Bad Request
schema:
$ref: '#/definitions/appresult.AppError'
"404":
description: Not Found
schema:
$ref: '#/definitions/appresult.AppError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/appresult.AppError'
tags:
- file-upload
/file/{id}:
delete:
description: remove file
@@ -2298,29 +2328,6 @@ paths:
- BearerAuth: []
tags:
- file-upload
get:
description: download file
parameters:
- description: object name
in: path
name: id
required: true
type: string
produces:
- application/octet-stream
responses:
"200":
description: OK
schema:
type: file
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/appresult.AppError'
security:
- BearerAuth: []
tags:
- file-upload
/forgot-password:
post:
consumes:
@@ -4758,7 +4765,7 @@ paths:
tags:
- user
get:
description: Returns a single user
description: Returns a single user with assigned branches
parameters:
- description: User ID
in: path
@@ -4831,7 +4838,8 @@ paths:
- user
/users/clients:
get:
description: Returns paginated client users (role user, not assigned to any branch)
description: Returns paginated client users (role user, not assigned to any
branch)
parameters:
- description: Search by username, first name, or last name
in: query