docs: regenerate swagger and drop stale TODO comment
- regenerate AsyncTask swagger responses, keeping only the documented case - remove obsolete 200/400/404/500 response entries from docs/swagger - delete commented-out termsOfService TODO from main.go API annotations
This commit is contained in:
parent
98a28b62eb
commit
2650771cdb
72
docs/docs.go
72
docs/docs.go
|
|
@ -332,34 +332,10 @@ const docTemplate = `{
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "查询成功",
|
|
||||||
"schema": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/network.SuccessResponse"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"payload": {
|
|
||||||
"$ref": "#/definitions/network.AsyncTaskResultQueryResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "请求参数错误",
|
"description": "请求参数错误",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
"$ref": "#/definitions/network.FailureResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "服务器内部错误",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -388,40 +364,10 @@ const docTemplate = `{
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "查询成功",
|
|
||||||
"schema": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/network.SuccessResponse"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"payload": {
|
|
||||||
"$ref": "#/definitions/network.AsyncTaskResult"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "请求参数错误",
|
"description": "请求参数错误",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
"$ref": "#/definitions/network.FailureResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "任务不存在",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "服务器内部错误",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -450,28 +396,10 @@ const docTemplate = `{
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "任务取消成功",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.SuccessResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "请求参数错误或任务无法取消",
|
"description": "请求参数错误或任务无法取消",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
"$ref": "#/definitions/network.FailureResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "任务不存在",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "服务器内部错误",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -326,34 +326,10 @@
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "查询成功",
|
|
||||||
"schema": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/network.SuccessResponse"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"payload": {
|
|
||||||
"$ref": "#/definitions/network.AsyncTaskResultQueryResponse"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "请求参数错误",
|
"description": "请求参数错误",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
"$ref": "#/definitions/network.FailureResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "服务器内部错误",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -382,40 +358,10 @@
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "查询成功",
|
|
||||||
"schema": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/network.SuccessResponse"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"payload": {
|
|
||||||
"$ref": "#/definitions/network.AsyncTaskResult"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "请求参数错误",
|
"description": "请求参数错误",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
"$ref": "#/definitions/network.FailureResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "任务不存在",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "服务器内部错误",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -444,28 +390,10 @@
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "任务取消成功",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.SuccessResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"description": "请求参数错误或任务无法取消",
|
"description": "请求参数错误或任务无法取消",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
"$ref": "#/definitions/network.FailureResponse"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"description": "任务不存在",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "服务器内部错误",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/network.FailureResponse"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -361,26 +361,9 @@ paths:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 查询成功
|
|
||||||
schema:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/definitions/network.SuccessResponse'
|
|
||||||
- properties:
|
|
||||||
payload:
|
|
||||||
$ref: '#/definitions/network.AsyncTaskResult'
|
|
||||||
type: object
|
|
||||||
"400":
|
|
||||||
description: 请求参数错误
|
description: 请求参数错误
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
$ref: '#/definitions/network.FailureResponse'
|
||||||
"404":
|
|
||||||
description: 任务不存在
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
|
||||||
"500":
|
|
||||||
description: 服务器内部错误
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
|
||||||
summary: 查询异步任务详情
|
summary: 查询异步任务详情
|
||||||
tags:
|
tags:
|
||||||
- AsyncTask
|
- AsyncTask
|
||||||
|
|
@ -399,21 +382,9 @@ paths:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 任务取消成功
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/network.SuccessResponse'
|
|
||||||
"400":
|
|
||||||
description: 请求参数错误或任务无法取消
|
description: 请求参数错误或任务无法取消
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
$ref: '#/definitions/network.FailureResponse'
|
||||||
"404":
|
|
||||||
description: 任务不存在
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
|
||||||
"500":
|
|
||||||
description: 服务器内部错误
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
|
||||||
summary: 取消异步任务
|
summary: 取消异步任务
|
||||||
tags:
|
tags:
|
||||||
- AsyncTask
|
- AsyncTask
|
||||||
|
|
@ -432,22 +403,9 @@ paths:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 查询成功
|
|
||||||
schema:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/definitions/network.SuccessResponse'
|
|
||||||
- properties:
|
|
||||||
payload:
|
|
||||||
$ref: '#/definitions/network.AsyncTaskResultQueryResponse'
|
|
||||||
type: object
|
|
||||||
"400":
|
|
||||||
description: 请求参数错误
|
description: 请求参数错误
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
$ref: '#/definitions/network.FailureResponse'
|
||||||
"500":
|
|
||||||
description: 服务器内部错误
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/network.FailureResponse'
|
|
||||||
summary: 查询异步任务结果
|
summary: 查询异步任务结果
|
||||||
tags:
|
tags:
|
||||||
- AsyncTask
|
- AsyncTask
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -59,8 +59,6 @@ var (
|
||||||
// @title ModelRT 实时模型服务 API 文档
|
// @title ModelRT 实时模型服务 API 文档
|
||||||
// @version 1.0
|
// @version 1.0
|
||||||
// @description 实时数据计算和模型运行服务的 API 服务
|
// @description 实时数据计算和模型运行服务的 API 服务
|
||||||
// TODO termsOfService服务条款待后续优化
|
|
||||||
// // @termsOfService http://swagger.io/terms/
|
|
||||||
//
|
//
|
||||||
// @contact.name douxu
|
// @contact.name douxu
|
||||||
// TODO 修改支持的文档地址
|
// TODO 修改支持的文档地址
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue