feat: 添加公开内容相关API接口及测试用例

This commit is contained in:
2025-12-22 16:33:35 +08:00
parent 39454458f1
commit 7eb7b14557
4 changed files with 508 additions and 0 deletions

View File

@@ -2675,6 +2675,122 @@ paths:
summary: 我的订单详情(当前租户)
tags:
- Tenant
/t/{tenantCode}/v1/public/contents:
get:
consumes:
- application/json
parameters:
- description: Tenant Code
in: path
name: tenantCode
required: true
type: string
- description: Keyword filters by title keyword (LIKE).
in: query
name: keyword
type: string
- description: Limit is page size; only values in {10,20,50,100} are accepted
(otherwise defaults to 10).
in: query
name: limit
type: integer
- description: Page is 1-based page index; values <= 0 are normalized to 1.
in: query
name: page
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/requests.Pager'
- properties:
items:
$ref: '#/definitions/dto.ContentItem'
type: object
summary: 公开内容列表(已发布 + public
tags:
- TenantPublic
/t/{tenantCode}/v1/public/contents/{contentID}:
get:
consumes:
- application/json
parameters:
- description: Tenant Code
in: path
name: tenantCode
required: true
type: string
- description: ContentID
format: int64
in: path
name: contentID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.ContentDetail'
summary: 公开内容详情(已发布 + public
tags:
- TenantPublic
/t/{tenantCode}/v1/public/contents/{contentID}/assets:
get:
consumes:
- application/json
parameters:
- description: Tenant Code
in: path
name: tenantCode
required: true
type: string
- description: ContentID
format: int64
in: path
name: contentID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.ContentAssetsResponse'
summary: 获取公开正片资源main role免费/作者/已购)
tags:
- TenantPublic
/t/{tenantCode}/v1/public/contents/{contentID}/preview:
get:
consumes:
- application/json
parameters:
- description: Tenant Code
in: path
name: tenantCode
required: true
type: string
- description: ContentID
format: int64
in: path
name: contentID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.ContentAssetsResponse'
summary: 获取公开试看资源preview role
tags:
- TenantPublic
securityDefinitions:
BasicAuth:
type: basic