- 新增 userService.js,包含用户认证、资料更新、token 刷新等功能 - 新增 wechatService.js,处理微信API交互,获取openid和手机号 - 新增 appError.js,封装应用错误处理 - 新增 logger.js,提供日志记录功能 - 新增 response.js,统一成功响应格式 - 新增 sanitize.js,提供输入数据清洗功能 - 更新 OpenAPI 文档,描述新增接口及请求响应格式 - 更新 PocketBase 数据库结构,调整用户表字段及索引策略 - 增强错误处理机制,确保错误信息可观测性 - 更新变更记录文档,详细记录本次变更内容
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
openapi: 3.1.0
|
||
info:
|
||
title: BAI Management API
|
||
description: 精简后的后端 API,仅保留健康检查接口
|
||
version: 1.0.0
|
||
servers:
|
||
- url: https://bai-api.blv-oa.com
|
||
description: BAI-api生产环境
|
||
- url: http://localhost:3000
|
||
description: BAI-api本地开发环境
|
||
tags:
|
||
- name: 系统
|
||
description: 基础健康检查接口
|
||
components:
|
||
schemas:
|
||
ApiResponse:
|
||
type: object
|
||
required: [code, msg, data]
|
||
properties:
|
||
code:
|
||
type: integer
|
||
example: 200
|
||
msg:
|
||
type: string
|
||
example: 操作成功
|
||
data:
|
||
type: object
|
||
additionalProperties: true
|
||
HealthData:
|
||
type: object
|
||
properties:
|
||
status:
|
||
type: string
|
||
example: healthy
|
||
timestamp:
|
||
type: string
|
||
format: date-time
|
||
paths:
|
||
/api/health:
|
||
post:
|
||
tags: [系统]
|
||
summary: 健康检查
|
||
description: 检查服务是否正常运行
|
||
responses:
|
||
'200':
|
||
description: 服务状态正常
|
||
content:
|
||
application/json:
|
||
schema:
|
||
allOf:
|
||
- $ref: '#/components/schemas/ApiResponse'
|
||
- type: object
|
||
properties:
|
||
data:
|
||
$ref: '#/components/schemas/HealthData'
|
||
|
||
properties:
|