Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
d579559c
authored
Apr 08, 2026
by
Ryo
Committed by
GitHub
Apr 08, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: openapi schema issue while creating openapi json (#6727)
parent
c8bbd8a6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
12 deletions
+46
-12
packages/global/core/chat/helperBot/type.ts
+1
-1
packages/global/openapi/core/ai/sandbox/api.ts
+1
-1
packages/global/openapi/core/app/common/api.ts
+17
-1
packages/global/openapi/core/chat/helperBot/api.ts
+4
-6
packages/global/openapi/support/user/account/login/api.ts
+20
-0
packages/global/openapi/support/user/account/login/index.ts
+2
-2
packages/global/openapi/support/wallet/bill/api.ts
+1
-1
No files found.
packages/global/core/chat/helperBot/type.ts
View file @
d579559c
...
...
@@ -49,7 +49,7 @@ const AIChatItemSchema = z.object({
});
export
type
AIChatItemType
=
z
.
infer
<
typeof
AIChatItemSchema
>
;
const
HelperBotChatRoleSchema
=
z
.
discriminatedUnion
(
'obj'
,
[
const
HelperBotChatRoleSchema
=
z
.
union
(
[
UserChatItemSchema
,
SystemChatItemSchema
,
AIChatItemSchema
...
...
packages/global/openapi/core/ai/sandbox/api.ts
View file @
d579559c
...
...
@@ -4,7 +4,7 @@ import { z } from 'zod';
/**
* 文件操作 - 统一请求体
*/
export
const
SandboxFileOperationBodySchema
=
z
.
discriminatedUnion
(
'action'
,
[
export
const
SandboxFileOperationBodySchema
=
z
.
union
(
[
z
.
object
({
action
:
z
.
literal
(
'list'
),
appId
:
z
.
string
(),
...
...
packages/global/openapi/core/app/common/api.ts
View file @
d579559c
...
...
@@ -6,6 +6,21 @@ import { StoreEdgeItemTypeSchema } from '../../../../core/workflow/type/edge';
import
{
StoreNodeItemTypeSchema
}
from
'../../../../core/workflow/type/node'
;
import
{
ShortUrlSchema
}
from
'../../../../support/marketing/type'
;
import
{
z
}
from
'zod'
;
import
{
FlowNodeOutputItemTypeSchema
}
from
'../../../../core/workflow/type/io'
;
const
OpenAPIFlowNodeOutputItemTypeSchema
=
FlowNodeOutputItemTypeSchema
.
omit
({
invalidCondition
:
true
}).
extend
({
invalidCondition
:
z
.
any
().
optional
().
meta
({
description
:
'Internal editor validation function. This field is not expected in API payloads.'
})
});
const
OpenAPIStoreNodeItemTypeSchema
=
StoreNodeItemTypeSchema
.
omit
({
outputs
:
true
}).
extend
({
outputs
:
z
.
array
(
OpenAPIFlowNodeOutputItemTypeSchema
)
});
/* Get App Permission */
export
const
GetAppPermissionQuerySchema
=
z
.
object
({
...
...
@@ -14,6 +29,7 @@ export const GetAppPermissionQuerySchema = z.object({
description
:
'应用 ID'
})
});
export
type
GetAppPermissionQueryType
=
z
.
infer
<
typeof
GetAppPermissionQuerySchema
>
;
export
const
GetAppPermissionResponseSchema
=
z
.
object
({
...
...
@@ -58,7 +74,7 @@ export const CreateAppBodySchema = z
example
:
AppTypeEnum
.
workflow
,
description
:
'应用类型'
}),
modules
:
z
.
array
(
StoreNodeItemTypeSchema
).
meta
({
modules
:
z
.
array
(
OpenAPI
StoreNodeItemTypeSchema
).
meta
({
example
:
[],
description
:
'应用节点配置'
}),
...
...
packages/global/openapi/core/chat/helperBot/api.ts
View file @
d579559c
...
...
@@ -59,11 +59,9 @@ export const HelperBotCompletionsParamsSchema = z.object({
name
:
z
.
string
()
})
),
metadata
:
z
.
discriminatedUnion
(
'type'
,
[
z
.
object
({
type
:
z
.
literal
(
HelperBotTypeEnum
.
topAgent
),
data
:
topAgentParamsSchema
})
])
metadata
:
z
.
object
({
type
:
z
.
literal
(
HelperBotTypeEnum
.
topAgent
),
data
:
topAgentParamsSchema
})
});
export
type
HelperBotCompletionsParamsType
=
z
.
infer
<
typeof
HelperBotCompletionsParamsSchema
>
;
packages/global/openapi/support/user/account/login/api.ts
View file @
d579559c
...
...
@@ -2,6 +2,26 @@ import { z } from 'zod';
import
{
OAuthEnum
}
from
'../../../../../support/user/constant'
;
import
{
TrackRegisterParamsSchema
}
from
'../../../../../support/marketing/type'
;
import
{
LanguageSchema
}
from
'../../../../../common/i18n/type'
;
import
{
TeamTmbItemSchema
}
from
'../../../../../support/user/team/type'
;
import
{
UserSchema
}
from
'../../../../../support/user/type'
;
const
OpenAPITeamTmbItemSchema
=
TeamTmbItemSchema
.
omit
({
permission
:
true
}).
extend
({
permission
:
z
.
any
().
meta
({
description
:
'团队权限实例。返回值为服务端权限对象,文档中按任意结构展示。'
})
});
export
const
OpenAPIUserSchema
=
UserSchema
.
omit
({
team
:
true
,
permission
:
true
}).
extend
({
team
:
OpenAPITeamTmbItemSchema
,
permission
:
z
.
any
().
meta
({
description
:
'用户权限实例。返回值为服务端权限对象,文档中按任意结构展示。'
})
});
export
const
LoginSuccessResponseSchema
=
z
.
object
({
user
:
z
.
any
().
meta
({
...
...
packages/global/openapi/support/user/account/login/index.ts
View file @
d579559c
...
...
@@ -10,7 +10,7 @@ import {
GetWXLoginQRResponseSchema
,
LoginSuccessResponseSchema
}
from
'./api'
;
import
{
UserSchema
}
from
'../../../../../support/user/type
'
;
import
{
OpenAPIUserSchema
}
from
'./api
'
;
export
const
LoginPath
:
OpenAPIPath
=
{
'/support/user/account/tokenLogin'
:
{
...
...
@@ -23,7 +23,7 @@ export const LoginPath: OpenAPIPath = {
description
:
'成功获取用户信息'
,
content
:
{
'application/json'
:
{
schema
:
UserSchema
schema
:
OpenAPI
UserSchema
}
}
}
...
...
packages/global/openapi/support/wallet/bill/api.ts
View file @
d579559c
...
...
@@ -76,7 +76,7 @@ export const CreateExtractDatasetBillSchema = z
discountCouponId
:
z
.
string
().
optional
().
meta
({
description
:
'优惠券 ID(未使用)'
})
})
.
meta
({
description
:
'额外数据集存储订单创建参数'
});
export
const
CreateBillPropsSchema
=
z
.
discriminatedUnion
(
'type'
,
[
export
const
CreateBillPropsSchema
=
z
.
union
(
[
CreateStandPlanBillSchema
,
CreateExtractPointsBillSchema
,
CreateExtractDatasetBillSchema
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment