mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
add yaml schema
This commit is contained in:
parent
d3f0aa8045
commit
d7c2ec3cb4
@ -29,7 +29,53 @@ const monacoInitialization = (): void => {
|
||||
uri: 'http://example.com/meta-json-schema.json',
|
||||
fileMatch: ['**/*.clash.yaml'],
|
||||
// @ts-ignore // type JSONSchema7
|
||||
schema: metaSchema
|
||||
schema: {
|
||||
...metaSchema,
|
||||
patternProperties: {
|
||||
'\\+rules': {
|
||||
type: 'array',
|
||||
$ref: '#/definitions/rules',
|
||||
description: '“+”开头表示将内容插入到原数组前面'
|
||||
},
|
||||
'rules\\+': {
|
||||
type: 'array',
|
||||
$ref: '#/definitions/rules',
|
||||
description: '“+”结尾表示将内容追加到原数组后面'
|
||||
},
|
||||
'\\+proxies': {
|
||||
type: 'array',
|
||||
$ref: '#/definitions/proxies',
|
||||
description: '“+”开头表示将内容插入到原数组前面'
|
||||
},
|
||||
'proxies\\+': {
|
||||
type: 'array',
|
||||
$ref: '#/definitions/proxies',
|
||||
description: '“+”结尾表示将内容追加到原数组后面'
|
||||
},
|
||||
'\\+proxy-groups': {
|
||||
type: 'array',
|
||||
$ref: '#/definitions/proxy-groups',
|
||||
description: '“+”开头表示将内容插入到原数组前面'
|
||||
},
|
||||
'proxy-groups\\+': {
|
||||
type: 'array',
|
||||
$ref: '#/definitions/proxy-groups',
|
||||
description: '“+”结尾表示将内容追加到原数组后面'
|
||||
},
|
||||
'^\\+': {
|
||||
type: 'array',
|
||||
description: '“+”开头表示将内容插入到原数组前面'
|
||||
},
|
||||
'\\+$': {
|
||||
type: 'array',
|
||||
description: '“+”结尾表示将内容追加到原数组后面'
|
||||
},
|
||||
'!$': {
|
||||
type: 'object',
|
||||
description: '“!”结尾表示强制覆盖该项而不进行递归合并'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user