fix: openapi integer & array type (#1439)

This commit is contained in:
heheer
2024-05-10 18:40:01 +08:00
committed by GitHub
parent d70efe1d6f
commit f351d4ea68
2 changed files with 34 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ import { useTranslation } from 'next-i18next';
import { getLafAppDetail } from '@/web/support/laf/api';
import MySelect from '@fastgpt/web/components/common/MySelect';
import { getApiSchemaByUrl } from '@/web/core/plugin/api';
import { str2OpenApiSchema } from '@fastgpt/global/core/plugin/httpPlugin/utils';
import { getType, str2OpenApiSchema } from '@fastgpt/global/core/plugin/httpPlugin/utils';
import { useUserStore } from '@/web/support/user/useUserStore';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import { ChevronRightIcon } from '@chakra-ui/icons';
@@ -155,7 +155,7 @@ const NodeLaf = (props: NodeProps<FlowNodeItemType>) => {
desc: bodyParams[key].description,
required: requiredParams?.includes(key) || false,
value: `{{${key}}}`,
type: bodyParams[key].type
type: getType(bodyParams[key])
}))
].filter((item) => !inputs.find((input) => input.key === item.name));
@@ -189,7 +189,7 @@ const NodeLaf = (props: NodeProps<FlowNodeItemType>) => {
const allResponseParams = [
...Object.keys(responseParams).map((key) => ({
valueType: responseParams[key].type,
valueType: getType(responseParams[key]),
name: key,
desc: responseParams[key].description,
required: requiredResponseParams?.includes(key) || false