diff options
| author | zyh <[email protected]> | 2024-09-10 15:44:15 +0800 |
|---|---|---|
| committer | zyh <[email protected]> | 2024-09-10 15:44:15 +0800 |
| commit | 940dc896ddde2343926eb5a819bbd44d8175207e (patch) | |
| tree | 2818739e638b4e88e1f1f3ae4477186e78f4b895 /src | |
| parent | 3648905913a17da6669f7a434ca0ecc73d7447b4 (diff) | |
ASW-69 fix: application surrogate json编辑器缺少关键字提示功能
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/monaco/schema.js | 81 |
1 files changed, 76 insertions, 5 deletions
diff --git a/src/components/monaco/schema.js b/src/components/monaco/schema.js index 4f84b9a..96cc098 100644 --- a/src/components/monaco/schema.js +++ b/src/components/monaco/schema.js @@ -4,10 +4,81 @@ export const schema = { properties: { surrogates: { type: 'array', - items: {}, + items: { + type: 'object', + properties: { + name: { + type: 'string', + }, + description: { + type: 'string', + }, + signatures: { + type: 'array', + items: { + type: 'object', + properties: { + name: { + type: 'string', + }, + description: { + type: 'string', + }, + conditions: { + type: 'array', + items: { + type: 'object', + properties: { + attributeName: { + type: 'string', + }, + attributeType: { + type: 'string', + }, + negate_option: { + type: 'boolean', + }, + description: { + type: 'string', + }, + items: { + type: 'array', + items: { + type: 'object', + properties: { + item: { + type: 'string', + }, + description: { + type: 'string', + }, + exprType: { + enum: ['regex', 'and'], + }, + district: { + type: 'string', + }, + }, + required: ['item'], + }, + }, + }, + required: [ + 'attributeName', + 'attributeType', + 'negate_option', + 'items', + ], + }, + }, + }, + required: ['name', 'conditions'], + }, + }, + }, + required: ['name', 'signatures'], + }, }, }, - required: [ - 'surrogates', - ], -}
\ No newline at end of file + required: ['surrogates'], +}; |
