56 lines
1.3 KiB
JSON
56 lines
1.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://example.com/language-config.schema.json",
|
|
"title": "Language Configuration",
|
|
"description": "Schema for validating language configuration files",
|
|
"type": "object",
|
|
"properties": {
|
|
"$schema": {
|
|
"type": "string"
|
|
},
|
|
"iconsUrl": {
|
|
"type": "string"
|
|
},
|
|
"languages": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "显示的语言名",
|
|
"pattern": "^[\\p{L}\\p{N}\\s-]+$"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "语言ID",
|
|
"pattern": "^[a-z]{2}-[a-z]{2}$"
|
|
},
|
|
"file": {
|
|
"type": "string",
|
|
"description": "语言文件在language文件夹的位置",
|
|
"pattern": "^[A-Z]{2}_[A-Z]{2}\\.json$"
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"description": "语言的图标",
|
|
"pattern": "^.*:.*$"
|
|
}
|
|
},
|
|
"required": [
|
|
"title",
|
|
"id",
|
|
"file",
|
|
"icon"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"languages"
|
|
],
|
|
"additionalProperties": false
|
|
}
|