Adding ui-json schemas (#188)
This commit is contained in:
35
source/resource/ui/general/item_ref.json
Normal file
35
source/resource/ui/general/item_ref.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Item reference",
|
||||
"description": "A reference to an item: using the following syntax: [element_name]@[namespace_reference].[element_name_reference]",
|
||||
"type": "string",
|
||||
"examples": ["button@minecraft", "button@minecraft:ui"],
|
||||
"pattern": "^[a-zA-Z0-9_]*@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$"
|
||||
},
|
||||
{
|
||||
"title": "Item reference",
|
||||
"description": "A reference to an item: using the following syntax: [namespace_reference].[element_name_reference]",
|
||||
"type": "string",
|
||||
"examples": ["button@minecraft", "button@minecraft:ui"],
|
||||
"pattern": "[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$"
|
||||
},
|
||||
{
|
||||
"title": "Variable reference",
|
||||
"description": "A variable is a reference to a value that can be used in the UI.",
|
||||
"type": "string",
|
||||
"anyOf": [
|
||||
{
|
||||
"pattern": "^\\$[a-zA-Z0-9_]+$"
|
||||
},
|
||||
{
|
||||
"pattern": "^#[a-zA-Z0-9_]+$"
|
||||
},
|
||||
{
|
||||
"pattern": "^\\(.*\\)$"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user