API Conventions
团队内部注:强烈建议「接口显示为URL」而非「接口显示为名称」。
Data Schemas
Current schemas naming: <xxx>
: list<xxx>
s.<xxx_base>
: only necessary fields<xxx_detail>
: list one<xxx>
detailedly
null
if []
, ""
are enough, to keep a singular type. Use null
only when necessary, for example when the integer
value doesn't exist and it's reasonable not to omit it.string
values, there should be a length limit. Similarly, there should be a size limit on file
value.API URL
API Responce
success
Only use HTTP status code 200.
1.Files. Except small text content, if suitable. 2.Data that needs explicit sort
/limit
etc.
error
400, 401, 403, 404, 422.
500
code
item to clarify, which is a concise and human-readable string
enum.detail
(string
) can be added for convenience in debugging.Modified at 2023-12-20 13:30:14