fix(schema): 默认参数非必填

This commit is contained in:
baiqi 2024-07-16 10:17:35 +08:00 committed by Craftsman
parent 6dd5cf73f7
commit cc414e64dc
1 changed files with 3 additions and 3 deletions

View File

@ -101,7 +101,7 @@ function createItem(key: string, value: any, parent?: JsonSchemaTableItem): Json
type: itemType,
description: '',
enable: true,
required: true,
required: false,
defaultValue: '',
example: exampleValue, // 仅当值不是对象或数组时,才赋予 example 值
parent,
@ -135,7 +135,7 @@ export function parseJsonToJsonSchemaTableData(
type: Array.isArray(json) ? 'array' : 'object',
description: '',
enable: true,
required: true,
required: false,
example: '',
defaultValue: '',
};
@ -202,7 +202,7 @@ export function parseSchemaToJsonSchemaTableData(schema: string | JsonSchema): {
type: node.type,
description: node.description,
enable: true,
required: true,
required: false,
example: '',
defaultValue: '',
};