refactor(api): 统一 HTTP 200 响应契约
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
openapi: 3.0.3
|
||||
info:
|
||||
title: 柏悦头程履约 API
|
||||
description: 业务成功和失败均使用 HTTP 200;仅响应体 code 为字符串 "200" 时表示成功,其他 code 表示失败。
|
||||
version: 1.1.0
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -17,7 +18,7 @@ paths:
|
||||
- {name: status, in: query, schema: {type: string, enum: [PENDING_ASSIGNMENT, ASSIGNED, PROCESSING, COMPLETED, CANCELLED]}}
|
||||
- {name: assigneeId, in: query, schema: {type: integer, format: int64}}
|
||||
responses:
|
||||
'200': {description: 查询成功}
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无查询权限}
|
||||
/api/platform/v1/first-leg/tasks/{taskId}:
|
||||
get:
|
||||
@@ -27,9 +28,8 @@ paths:
|
||||
- $ref: '#/components/parameters/TenantId'
|
||||
- $ref: '#/components/parameters/TaskId'
|
||||
responses:
|
||||
'200': {description: 查询成功}
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无查看权限}
|
||||
'404': {description: 任务不存在}
|
||||
/api/platform/v1/first-leg/tasks/by-order/{orderId}:
|
||||
get:
|
||||
summary: 按订单查询履约任务
|
||||
@@ -38,9 +38,8 @@ paths:
|
||||
- $ref: '#/components/parameters/TenantId'
|
||||
- {name: orderId, in: path, required: true, schema: {type: integer, format: int64}}
|
||||
responses:
|
||||
'200': {description: 查询成功}
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无查看权限}
|
||||
'404': {description: 任务不存在}
|
||||
/api/platform/v1/first-leg/tasks/{taskId}/assignment-history:
|
||||
get:
|
||||
summary: 分页查询任务分配历史
|
||||
@@ -51,9 +50,8 @@ paths:
|
||||
- $ref: '#/components/parameters/Page'
|
||||
- $ref: '#/components/parameters/Size'
|
||||
responses:
|
||||
'200': {description: 查询成功}
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无历史查看权限}
|
||||
'404': {description: 任务不存在}
|
||||
/api/platform/v1/first-leg/tasks/{taskId}/assignment:
|
||||
post:
|
||||
summary: 分配或改派履约任务
|
||||
@@ -67,10 +65,8 @@ paths:
|
||||
application/json:
|
||||
schema: {$ref: '#/components/schemas/AssignRequest'}
|
||||
responses:
|
||||
'200': {description: 分配成功}
|
||||
'200': {description: 成功或业务失败,按响应体 code 判断}
|
||||
'403': {description: 无分配权限}
|
||||
'404': {description: 任务不存在}
|
||||
'409': {description: 任务已关闭或发生并发更新}
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
|
||||
Reference in New Issue
Block a user