[feature] migrate to monorepo
This commit is contained in:
commit
05ddc1f783
267 changed files with 75165 additions and 0 deletions
170
api/schemas/paths/daily.yaml
Normal file
170
api/schemas/paths/daily.yaml
Normal file
|
@ -0,0 +1,170 @@
|
|||
daily:
|
||||
get:
|
||||
tags:
|
||||
- daily
|
||||
summary: 获取每日一图列表
|
||||
operationId: listDaily
|
||||
parameters:
|
||||
- $ref: '../components/parameters.yaml#/Page'
|
||||
- $ref: '../components/parameters.yaml#/PerPage'
|
||||
- $ref: '../components/parameters.yaml#/Sort'
|
||||
- $ref: '../components/parameters.yaml#/Language'
|
||||
- name: category_id
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
description: 按分类ID筛选
|
||||
responses:
|
||||
'200':
|
||||
description: 成功获取每日一图列表
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '../components/schemas.yaml#/Response'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '../components/schemas.yaml#/Daily'
|
||||
post:
|
||||
tags:
|
||||
- daily
|
||||
summary: 创建每日一图
|
||||
operationId: createDaily
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- category_id
|
||||
- image_url
|
||||
- contents
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
pattern: '^\d{6}$'
|
||||
examples:
|
||||
- '250206'
|
||||
category_id:
|
||||
type: integer
|
||||
image_url:
|
||||
type: string
|
||||
format: uri
|
||||
contents:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- language_code
|
||||
- quote
|
||||
properties:
|
||||
language_code:
|
||||
type: string
|
||||
enum:
|
||||
- en
|
||||
- zh-Hans
|
||||
- zh-Hant
|
||||
quote:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
description: 每日一图创建成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '../components/schemas.yaml#/Daily'
|
||||
'401':
|
||||
$ref: '../components/responses.yaml#/Unauthorized'
|
||||
'403':
|
||||
$ref: '../components/responses.yaml#/Forbidden'
|
||||
'422':
|
||||
$ref: '../components/responses.yaml#/ValidationError'
|
||||
|
||||
daily_id:
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^\d{6}$'
|
||||
examples:
|
||||
- '250206'
|
||||
get:
|
||||
tags:
|
||||
- daily
|
||||
summary: 获取每日一图详情
|
||||
operationId: getDaily
|
||||
parameters:
|
||||
- $ref: '../components/parameters.yaml#/Language'
|
||||
responses:
|
||||
'200':
|
||||
description: 成功获取每日一图详情
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '../components/schemas.yaml#/Daily'
|
||||
'404':
|
||||
$ref: '../components/responses.yaml#/NotFound'
|
||||
put:
|
||||
tags:
|
||||
- daily
|
||||
summary: 更新每日一图
|
||||
operationId: updateDaily
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
category_id:
|
||||
type: integer
|
||||
image_url:
|
||||
type: string
|
||||
format: uri
|
||||
contents:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- language_code
|
||||
- quote
|
||||
properties:
|
||||
language_code:
|
||||
type: string
|
||||
enum:
|
||||
- en
|
||||
- zh-Hans
|
||||
- zh-Hant
|
||||
quote:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: 每日一图更新成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: '../components/schemas.yaml#/Daily'
|
||||
'401':
|
||||
$ref: '../components/responses.yaml#/Unauthorized'
|
||||
'403':
|
||||
$ref: '../components/responses.yaml#/Forbidden'
|
||||
'404':
|
||||
$ref: '../components/responses.yaml#/NotFound'
|
||||
'422':
|
||||
$ref: '../components/responses.yaml#/ValidationError'
|
Loading…
Add table
Add a link
Reference in a new issue