139 lines
4 KiB
YAML
139 lines
4 KiB
YAML
contributors:
|
|
get:
|
|
tags:
|
|
- contributors
|
|
summary: 获取贡献者列表
|
|
operationId: listContributors
|
|
parameters:
|
|
- $ref: '../components/parameters.yaml#/Page'
|
|
- $ref: '../components/parameters.yaml#/PerPage'
|
|
- $ref: '../components/parameters.yaml#/Sort'
|
|
responses:
|
|
'200':
|
|
description: 成功获取贡献者列表
|
|
content:
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/Response'
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '../components/schemas.yaml#/Contributor'
|
|
post:
|
|
tags:
|
|
- contributors
|
|
summary: 创建新贡献者
|
|
operationId: createContributor
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '../components/schemas.yaml#/Contributor'
|
|
responses:
|
|
'201':
|
|
description: 贡献者创建成功
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
data:
|
|
$ref: '../components/schemas.yaml#/Contributor'
|
|
'401':
|
|
$ref: '../components/responses.yaml#/Unauthorized'
|
|
'403':
|
|
$ref: '../components/responses.yaml#/Forbidden'
|
|
'422':
|
|
$ref: '../components/responses.yaml#/ValidationError'
|
|
|
|
contributor_id:
|
|
parameters:
|
|
- $ref: '../components/parameters.yaml#/Id'
|
|
get:
|
|
tags:
|
|
- contributors
|
|
summary: 获取贡献者详情
|
|
operationId: getContributor
|
|
responses:
|
|
'200':
|
|
description: 成功获取贡献者详情
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
data:
|
|
$ref: '../components/schemas.yaml#/Contributor'
|
|
'404':
|
|
$ref: '../components/responses.yaml#/NotFound'
|
|
put:
|
|
tags:
|
|
- contributors
|
|
summary: 更新贡献者信息
|
|
operationId: updateContributor
|
|
parameters:
|
|
- $ref: '../components/parameters.yaml#/Id'
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '../components/schemas.yaml#/Contributor'
|
|
responses:
|
|
'200':
|
|
description: 贡献者信息更新成功
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
data:
|
|
$ref: '../components/schemas.yaml#/Contributor'
|
|
'401':
|
|
$ref: '../components/responses.yaml#/Unauthorized'
|
|
'403':
|
|
$ref: '../components/responses.yaml#/Forbidden'
|
|
'404':
|
|
$ref: '../components/responses.yaml#/NotFound'
|
|
'422':
|
|
$ref: '../components/responses.yaml#/ValidationError'
|
|
|
|
contributor_posts:
|
|
parameters:
|
|
- $ref: '../components/parameters.yaml#/Id'
|
|
get:
|
|
tags:
|
|
- contributors
|
|
summary: 获取贡献者参与的文章列表
|
|
operationId: getContributorPosts
|
|
parameters:
|
|
- $ref: '../components/parameters.yaml#/Page'
|
|
- $ref: '../components/parameters.yaml#/PerPage'
|
|
- $ref: '../components/parameters.yaml#/Language'
|
|
- $ref: '../components/parameters.yaml#/Sort'
|
|
- $ref: '../components/parameters.yaml#/Status'
|
|
- name: role
|
|
in: query
|
|
schema:
|
|
type: string
|
|
description: 按贡献者角色筛选
|
|
responses:
|
|
'200':
|
|
description: 成功获取文章列表
|
|
content:
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/Response'
|
|
- type: object
|
|
properties:
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '../components/schemas.yaml#/Post'
|
|
'404':
|
|
$ref: '../components/responses.yaml#/NotFound'
|