Files
PartsInquiry/doc/openapi.yaml
Wdp-ab 562ec4abf9 后端:公告√
注意数据库新建notice表
2025-09-16 20:03:17 +08:00

68 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

openapi: 3.0.3
info:
title: PartsInquiry API
version: 0.1.0
description: >-
所有接口定义集中于此文件。每个 path 在 summary/description 中标注实现状态。
servers:
- url: /
paths:
/api/notices:
get:
summary: 公告列表(✅ Fully Implemented
description: 返回当前店铺可见的公告列表。后端与前端均已接入。
parameters:
- in: header
name: X-Shop-Id
required: false
schema:
type: integer
description: 店铺ID缺省为 1
responses:
'200':
description: 成功
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Notice'
components:
schemas:
Notice:
type: object
properties:
id:
type: integer
format: int64
shopId:
type: integer
format: int64
userId:
type: integer
format: int64
title:
type: string
content:
type: string
tag:
type: string
pinned:
type: boolean
startsAt:
type: string
format: date-time
endsAt:
type: string
format: date-time
status:
type: string
enum: [DRAFT, PUBLISHED, OFFLINE]
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time