editor icon indicating copy to clipboard operation
editor copied to clipboard

Function schema: Support both "values" and "schemaReference" in single argument

Open Joelant05 opened this issue 3 years ago • 2 comments

This would help condense the function schema significantly, since commands like /loot would have half as many definitions in the schema

Joelant05 avatar Sep 10 '22 11:09 Joelant05

Can you share a code example of the syntax you'd like us to support, @Joelant05?

solvedDev avatar Sep 19 '22 10:09 solvedDev

Basically I just want to be able to use schemaReference and values in the same command argument, e.g.

{
	"additionalData": {
		"schemaReference": "/data/packages/minecraftBedrock/schema/general/reference/identifiers.json#/definitions/item_identifiers",
		"values": ["mainhand", "offhand"]
	},
}

I've actually already implemented this locally, but haven't pushed it yet since I couldn't figure out a good way for the validator to support it.

Joelant05 avatar Sep 19 '22 18:09 Joelant05