487 lines
10 KiB
JSON
487 lines
10 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "聚玩争议服务",
|
|
"description": "处理订单争议申诉与仲裁。ID 字段(int64)以 string 传输",
|
|
"version": "1.0"
|
|
},
|
|
"schemes": [
|
|
"http",
|
|
"https"
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/api/v1/disputes": {
|
|
"get": {
|
|
"summary": "获取争议列表",
|
|
"operationId": "ListDisputes",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/DisputeListResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": "20"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"dispute"
|
|
],
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/disputes/{id}/appeal": {
|
|
"post": {
|
|
"summary": "申诉",
|
|
"operationId": "AppealDispute",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/EmptyResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/AppealReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"dispute"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/disputes/{id}/response": {
|
|
"post": {
|
|
"summary": "回应争议",
|
|
"operationId": "RespondDispute",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/EmptyResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/DisputeResponseReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"dispute"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/orders/{id}/dispute": {
|
|
"get": {
|
|
"summary": "获取订单争议",
|
|
"operationId": "GetOrderDispute",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Dispute"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"dispute"
|
|
]
|
|
},
|
|
"post": {
|
|
"summary": "发起争议",
|
|
"operationId": "CreateDispute",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/EmptyResp"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/CreateDisputeReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"dispute"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"AppealReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reason": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "AppealReq",
|
|
"required": [
|
|
"reason"
|
|
]
|
|
},
|
|
"CreateDisputeReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"evidence": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "CreateDisputeReq",
|
|
"required": [
|
|
"reason",
|
|
"evidence"
|
|
]
|
|
},
|
|
"Dispute": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"orderId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"initiatorId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"initiatorName": {
|
|
"type": "string"
|
|
},
|
|
"respondentId": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"evidence": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
},
|
|
"respondentReason": {
|
|
"type": "string"
|
|
},
|
|
"respondentEvidence": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"appealReason": {
|
|
"type": "string"
|
|
},
|
|
"appealedAt": {
|
|
"type": "string"
|
|
},
|
|
"resolvedBy": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"resolvedAt": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "Dispute",
|
|
"required": [
|
|
"id",
|
|
"orderId",
|
|
"initiatorId",
|
|
"initiatorName",
|
|
"respondentId",
|
|
"reason",
|
|
"evidence",
|
|
"status",
|
|
"respondentEvidence",
|
|
"createdAt",
|
|
"updatedAt"
|
|
]
|
|
},
|
|
"DisputeListReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"offset": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": "0"
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": "20"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "DisputeListReq"
|
|
},
|
|
"DisputeListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Dispute"
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/definitions/PageMeta"
|
|
}
|
|
},
|
|
"title": "DisputeListResp",
|
|
"required": [
|
|
"items",
|
|
"meta"
|
|
]
|
|
},
|
|
"DisputePathId": {
|
|
"type": "object",
|
|
"title": "DisputePathId"
|
|
},
|
|
"DisputeResponseReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"evidence": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"title": "DisputeResponseReq",
|
|
"required": [
|
|
"reason",
|
|
"evidence"
|
|
]
|
|
},
|
|
"EmptyResp": {
|
|
"type": "object",
|
|
"title": "EmptyResp"
|
|
},
|
|
"PageMeta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"offset": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
"title": "PageMeta",
|
|
"required": [
|
|
"total",
|
|
"offset",
|
|
"limit"
|
|
]
|
|
},
|
|
"PageReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"offset": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": "0"
|
|
},
|
|
"limit": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": "20"
|
|
}
|
|
},
|
|
"title": "PageReq",
|
|
"required": [
|
|
"offset",
|
|
"limit"
|
|
]
|
|
},
|
|
"SimpleUser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"nickname": {
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "SimpleUser",
|
|
"required": [
|
|
"id",
|
|
"nickname",
|
|
"avatar"
|
|
]
|
|
},
|
|
"UserProfile": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"nickname": {
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": " consumer, player, owner, admin"
|
|
},
|
|
"verifiedRoles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"verificationStatus": {
|
|
"type": "object"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"bio": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "UserProfile",
|
|
"required": [
|
|
"id",
|
|
"username",
|
|
"nickname",
|
|
"avatar",
|
|
"role",
|
|
"verifiedRoles",
|
|
"verificationStatus",
|
|
"createdAt"
|
|
]
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"apiKey": {
|
|
"type": "apiKey",
|
|
"description": "Enter JWT Bearer token **_only_**",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}
|