fix(schema): 将响应 data 字段标记为必填

This commit is contained in:
吴天一
2026-02-07 09:27:47 +08:00
parent e2d2e65620
commit 75d2611eda

View File

@@ -660,6 +660,7 @@ function appendActionPaths (openapi: Record<string, unknown>) {
{ $ref: '#/components/schemas/BaseResponse' }, { $ref: '#/components/schemas/BaseResponse' },
{ {
type: 'object', type: 'object',
required: ['data'],
properties: { properties: {
data: { data: {
...(typeof cleanReturn === 'object' && cleanReturn ? cleanReturn : {}), ...(typeof cleanReturn === 'object' && cleanReturn ? cleanReturn : {}),