From b958e9e8030a0c757287bb946aeeafc429af7a6e Mon Sep 17 00:00:00 2001 From: pohgxz Date: Thu, 29 Jan 2026 14:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20OpenAPI=20=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E7=9B=B8=E5=BA=94=E6=8E=A5=E5=8F=A3=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=20stream=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/napcat-schema/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/napcat-schema/index.ts b/packages/napcat-schema/index.ts index 513339bb..d8e040c5 100644 --- a/packages/napcat-schema/index.ts +++ b/packages/napcat-schema/index.ts @@ -105,7 +105,8 @@ export function generateOpenAPI () { retcode: 0, data: schemas.returnExample || {}, message: '', - wording: '' + wording: '', + stream: 'normal-action' } } }; @@ -119,7 +120,8 @@ export function generateOpenAPI () { retcode: error.code, data: null, message: error.description, - wording: error.description + wording: error.description, + stream: 'normal-action' } }; }); @@ -132,7 +134,8 @@ export function generateOpenAPI () { retcode: 1400, data: null, message: '请求参数错误或业务逻辑执行失败', - wording: '请求参数错误或业务逻辑执行失败' + wording: '请求参数错误或业务逻辑执行失败', + stream: 'normal-action' } }; } @@ -171,7 +174,8 @@ export function generateOpenAPI () { retcode: { type: 'number', description: '返回码' }, data: { ...cleanReturn, description: '数据' }, message: { type: 'string', description: '消息' }, - wording: { type: 'string', description: '提示' } + wording: { type: 'string', description: '提示' }, + stream: { type: 'string', description: '流式响应', enum: ['stream-action', 'normal-action'] } }, required: ['status', 'retcode', 'data'] },