diff --git a/docs/docs.go b/docs/docs.go index f674f98..8aa977c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -332,34 +332,10 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "查询成功", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/network.SuccessResponse" - }, - { - "type": "object", - "properties": { - "payload": { - "$ref": "#/definitions/network.AsyncTaskResultQueryResponse" - } - } - } - ] - } - }, - "400": { "description": "请求参数错误", "schema": { "$ref": "#/definitions/network.FailureResponse" } - }, - "500": { - "description": "服务器内部错误", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } } } } @@ -388,40 +364,10 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "查询成功", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/network.SuccessResponse" - }, - { - "type": "object", - "properties": { - "payload": { - "$ref": "#/definitions/network.AsyncTaskResult" - } - } - } - ] - } - }, - "400": { "description": "请求参数错误", "schema": { "$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": { "200": { - "description": "任务取消成功", - "schema": { - "$ref": "#/definitions/network.SuccessResponse" - } - }, - "400": { "description": "请求参数错误或任务无法取消", "schema": { "$ref": "#/definitions/network.FailureResponse" } - }, - "404": { - "description": "任务不存在", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } - }, - "500": { - "description": "服务器内部错误", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } } } } diff --git a/docs/swagger.json b/docs/swagger.json index c6bb033..5c5dc57 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -326,34 +326,10 @@ ], "responses": { "200": { - "description": "查询成功", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/network.SuccessResponse" - }, - { - "type": "object", - "properties": { - "payload": { - "$ref": "#/definitions/network.AsyncTaskResultQueryResponse" - } - } - } - ] - } - }, - "400": { "description": "请求参数错误", "schema": { "$ref": "#/definitions/network.FailureResponse" } - }, - "500": { - "description": "服务器内部错误", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } } } } @@ -382,40 +358,10 @@ ], "responses": { "200": { - "description": "查询成功", - "schema": { - "allOf": [ - { - "$ref": "#/definitions/network.SuccessResponse" - }, - { - "type": "object", - "properties": { - "payload": { - "$ref": "#/definitions/network.AsyncTaskResult" - } - } - } - ] - } - }, - "400": { "description": "请求参数错误", "schema": { "$ref": "#/definitions/network.FailureResponse" } - }, - "404": { - "description": "任务不存在", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } - }, - "500": { - "description": "服务器内部错误", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } } } } @@ -444,28 +390,10 @@ ], "responses": { "200": { - "description": "任务取消成功", - "schema": { - "$ref": "#/definitions/network.SuccessResponse" - } - }, - "400": { "description": "请求参数错误或任务无法取消", "schema": { "$ref": "#/definitions/network.FailureResponse" } - }, - "404": { - "description": "任务不存在", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } - }, - "500": { - "description": "服务器内部错误", - "schema": { - "$ref": "#/definitions/network.FailureResponse" - } } } } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 598c8d9..05519e2 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -361,26 +361,9 @@ paths: - application/json responses: "200": - description: 查询成功 - schema: - allOf: - - $ref: '#/definitions/network.SuccessResponse' - - properties: - payload: - $ref: '#/definitions/network.AsyncTaskResult' - type: object - "400": description: 请求参数错误 schema: $ref: '#/definitions/network.FailureResponse' - "404": - description: 任务不存在 - schema: - $ref: '#/definitions/network.FailureResponse' - "500": - description: 服务器内部错误 - schema: - $ref: '#/definitions/network.FailureResponse' summary: 查询异步任务详情 tags: - AsyncTask @@ -399,21 +382,9 @@ paths: - application/json responses: "200": - description: 任务取消成功 - schema: - $ref: '#/definitions/network.SuccessResponse' - "400": description: 请求参数错误或任务无法取消 schema: $ref: '#/definitions/network.FailureResponse' - "404": - description: 任务不存在 - schema: - $ref: '#/definitions/network.FailureResponse' - "500": - description: 服务器内部错误 - schema: - $ref: '#/definitions/network.FailureResponse' summary: 取消异步任务 tags: - AsyncTask @@ -432,22 +403,9 @@ paths: - application/json responses: "200": - description: 查询成功 - schema: - allOf: - - $ref: '#/definitions/network.SuccessResponse' - - properties: - payload: - $ref: '#/definitions/network.AsyncTaskResultQueryResponse' - type: object - "400": description: 请求参数错误 schema: $ref: '#/definitions/network.FailureResponse' - "500": - description: 服务器内部错误 - schema: - $ref: '#/definitions/network.FailureResponse' summary: 查询异步任务结果 tags: - AsyncTask diff --git a/main.go b/main.go index ea1a710..84fa153 100644 --- a/main.go +++ b/main.go @@ -59,8 +59,6 @@ var ( // @title ModelRT 实时模型服务 API 文档 // @version 1.0 // @description 实时数据计算和模型运行服务的 API 服务 -// TODO termsOfService服务条款待后续优化 -// // @termsOfService http://swagger.io/terms/ // // @contact.name douxu // TODO 修改支持的文档地址