mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 14:23:43 +01:00
Add drafts of JSON schemas
This commit is contained in:
parent
df148b556a
commit
a1931a93fb
4 changed files with 768 additions and 0 deletions
206
schemas/group.json
Normal file
206
schemas/group.json
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://raw.githubusercontent.com/xivdev/Penumbra/master/schemas/group.json",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Version": {
|
||||
"description": "???",
|
||||
"type": ["integer", "null"]
|
||||
},
|
||||
"Name": {
|
||||
"description": "Name of the group.",
|
||||
"type": "string"
|
||||
},
|
||||
"Description": {
|
||||
"description": "Description of the group.",
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"Image": {
|
||||
"description": "Relative path to a preview image for the group. Unused by Penumbra, present for round-trip import/export of TexTools-generated mods.",
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"Page": {
|
||||
"description": "TexTools page of the group. Unused by Penumbra, present for round-trip import/export of TexTools-generated mods.",
|
||||
"type": ["integer", "null"]
|
||||
},
|
||||
"Priority": {
|
||||
"description": "Priority of the group. If several groups define conflicting files or manipulations, the highest priority wins.",
|
||||
"type": ["integer", "null"]
|
||||
},
|
||||
"Type": {
|
||||
"description": "Group type. Single groups have one and only one of their options active at any point. Multi groups can have zero, one or many of their options active. Combining groups have n options, 2^n containers, and will have one and only one container active depending on the selected options.",
|
||||
"enum": ["Single", "Multi", "Imc", "Combining"]
|
||||
},
|
||||
"DefaultSettings": {
|
||||
"description": "Default configuration for the group.",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"Name",
|
||||
"Type"
|
||||
],
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"Type": {
|
||||
"const": "Single"
|
||||
},
|
||||
"Options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Description": {
|
||||
"description": "Description of the option.",
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"Image": {
|
||||
"description": "Unused by Penumbra.",
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"$ref": "https://raw.githubusercontent.com/xivdev/Penumbra/master/schemas/container.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"properties": {
|
||||
"Type": {
|
||||
"const": "Multi"
|
||||
},
|
||||
"Options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Description": {
|
||||
"description": "Description of the option.",
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"Priority": {
|
||||
"description": "Priority of the option. If several enabled options within the group define conflicting files or manipulations, the highest priority wins.",
|
||||
"type": ["integer", "null"]
|
||||
},
|
||||
"Image": {
|
||||
"description": "Unused by Penumbra.",
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"$ref": "https://raw.githubusercontent.com/xivdev/Penumbra/master/schemas/container.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"properties": {
|
||||
"Type": {
|
||||
"const": "Imc"
|
||||
},
|
||||
"AllVariants": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"OnlyAttributes": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"Identifier": {
|
||||
"$ref": "https://raw.githubusercontent.com/xivdev/Penumbra/master/schemas/container.json#/$defs/ImcIdentifier"
|
||||
},
|
||||
"DefaultEntry": {
|
||||
"$ref": "https://raw.githubusercontent.com/xivdev/Penumbra/master/schemas/container.json#/$defs/ImcEntry"
|
||||
},
|
||||
"Options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"description": "Name of the option.",
|
||||
"type": "string"
|
||||
},
|
||||
"Description": {
|
||||
"description": "Description of the option.",
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"Image": {
|
||||
"description": "Unused by Penumbra.",
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"Name"
|
||||
],
|
||||
"oneOf": [
|
||||
{
|
||||
"properties": {
|
||||
"AttributeMask": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"AttributeMask"
|
||||
]
|
||||
}, {
|
||||
"properties": {
|
||||
"IsDisableSubMod": {
|
||||
"const": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"IsDisableSubMod"
|
||||
]
|
||||
}
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"properties": {
|
||||
"Type": {
|
||||
"const": "Combining"
|
||||
},
|
||||
"Options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Name": {
|
||||
"description": "Name of the option.",
|
||||
"type": "string"
|
||||
},
|
||||
"Description": {
|
||||
"description": "Description of the option.",
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"Image": {
|
||||
"description": "Unused by Penumbra.",
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"Name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"Containers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "https://raw.githubusercontent.com/xivdev/Penumbra/master/schemas/container.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"unevaluatedProperties": false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue