Files
minecraft-data/schemas/blockMappings_schema.json
de073027b6 Disallow additional properties in blockMappings schema (#1067)
- Add additionalProperties: false to all object levels
- Use `$defs` to reduce repetition
- Add descriptions for clarity

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ItsDrike <ItsDrike@users.noreply.github.com>
2025-08-20 23:40:45 +02:00

34 lines
1.1 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "blockMappings",
"description": "Maps block names and states between PC and PE (Bedrock) versions.",
"type": "array",
"items": {
"type": "object",
"description": "A mapping between a PC and PE block.",
"properties": {
"pc": { "$ref": "#/$defs/blockRef", "description": "PC (Java Edition) block reference." },
"pe": { "$ref": "#/$defs/blockRef", "description": "PE (Bedrock Edition) block reference." }
},
"required": ["pc", "pe"],
"additionalProperties": false
},
"$defs": {
"blockRef": {
"type": "object",
"description": "A reference to a block, including its name and states.",
"properties": {
"name": {
"type": "string",
"description": "The block's unique name identifier."
},
"states": {
"type": "object",
"description": "The block's state properties as key-value pairs."
}
},
"required": ["name", "states"],
"additionalProperties": false
}
}
}