{
"$schema": "http://json-schema.org/draft/2020-12/schema",
"title": "UI Property State Output",
"description": "This schema defines the structure for capturing the state of a dynamic user interface, primarily focused on configuration groups and formula data.",
"type": "object",
"properties": {
"groups": {
"type": "object",
"description": "A top-level container for categorized configuration settings, organized by functional groups.",
"additionalProperties": {
"type": "object",
"description": "A specific functional group.",
"additionalProperties": {
"type": "object",
"description": "The current state of an individual UI property.",
"properties": {
"enabled": {
"type": "boolean",
"description": "A boolean indicator specifying if the property is currently active or interactive within the interface."
},
"required": {
"type": "boolean",
"description": "A boolean flag denoting whether the property must contain data"
},
"value": {
"description": "A field for single-point data entries, supporting strings, numbers, booleans, or null states.",
"type": ["string", "number", "boolean", "array", "null"]
},
"range": {
"description": "A composite object used when a property defines a numeric window rather than a single point.",
"type": "object",
"properties": {
"min": {
"$ref": "#/$defs/RangeProperty",
"description": "The lower bound of the defined data window."
},
"target": {
"$ref": "#/$defs/RangeProperty",
"description": "The ideal or central value within the window."
},
"max": {
"$ref": "#/$defs/RangeProperty",
"description": "The upper bound of the defined data window."
}
}
}
},
"required": ["enabled"],
"oneOf": [
{ "required": ["value"] },
{ "required": ["range"] }
],
"additionalProperties": false
}
}
},
"compositionToVary": {
"description": "Direct value capture for composition variables using parallel arrays.",
"type": "object",
"required": ["ingredientProperty", "processParameterProperty"],
"additionalProperties": false,
"properties": {
"ingredientProperty": {
"description": "Captured values for ingredient attributes. Use null if the column at this index is a process parameter.",
"type": "array",
"items": {
"description": "Generic container for ingredient data point."
}
},
"processParameterProperty": {
"description": "Captured values for process parameters. Use null if the column at this index is an ingredient.",
"type": "array",
"items": {
"description": "Generic container for ingredient data point."
}
}
}
}
},
"required": ["groups"],
"additionalProperties": false,
"$defs": {
"RangeProperty": {
"type": "object",
"description": "A reusable structure for individual bounds within a range.",
"properties": {
"value": {
"type": "number",
"description": "The specific numeric value for that bound."
},
"required": {
"type": "boolean",
"description": "Indicates if that specific bound (min, target, or max) must be explicitly defined."
}
},
"required": ["value"]}
}
}