{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "stylegen configuration", "type": "object", "definitions": { "AbstractColor": { "oneOf": [ { "$ref": "#/definitions/HexColor" }, { "$ref": "#/definitions/Color" }, { "$ref": "#/definitions/BaseElevatedColor" }, { "$ref": "#/definitions/LightDarkColor" } ] }, "HexColor": { "type": "string", "pattern": "^#?([0-9a-fA-F]{3})([0-9a-fA-F]{3})?$" }, "Color": { "type": "object", "properties": { "color": { "$ref": "#/definitions/HexColor" }, "alpha": { "type": "number", "minimum": 0.0, "maximum": 1.0 } }, "required": ["color"], "additionalProperties": false }, "BaseElevatedColor": { "type": "object", "properties": { "base": { "$ref": "#/definitions/AbstractColor" }, "elevated": { "$ref": "#/definitions/AbstractColor" } }, "required": ["base", "elevated"], "additionalProperties": false }, "LightDarkColor": { "type": "object", "properties": { "light": { "$ref": "#/definitions/AbstractColor" }, "dark": { "$ref": "#/definitions/AbstractColor" } }, "required": ["light", "dark"], "additionalProperties": false } }, "properties": { "access_level": { "type": "string", "description": "Access level of the generated Swift code.", "enum": [ "internal", "public" ] }, "system_name": { "type": "string", "description": "Name of the design system or theme." }, "output_path": { "type": "string", "minLength": 1, "description": "Path of generated Swift file." }, "colors": { "type": "object", "description": "Key-value pairs of colors.", "patternProperties": { "^.*$": { "anyOf": [ { "$ref": "#/definitions/AbstractColor" } ] } }, "additionalProperties": false } }, "required": [ "output_path", "colors" ] }