repository
stringclasses
528 values
commit
stringlengths
40
40
commitDate
timestamp[s]
path
stringlengths
11
149
repoStars
int64
5
94.9k
repoLastFetched
stringclasses
528 values
content
stringlengths
48
736k
license
stringclasses
14 values
language
stringclasses
7 values
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/schemas/labels.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "labels.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "patternProperties": { "": { "properties": { "en": { "type": "string" }, "fr": { "type": "string" } }, "required": [ "en", "fr" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/schemas/subschemas/task.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/task.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "items": { "enum": [ "damage_detection", "wheel_analysis", "repair_estimate", "images_ocr", "image_editing", "inspection_pdf", "pricing", "dashboard_ocr" ], "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/ffocus18/ffocus18.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "ffocus18.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^ffocus18-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^ffocus18-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "ffocus18-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
dee9704b5ef7426b9abe3532d6a29cae12e4c728
2023-11-13T09:27:21
packages/sights/research/schemas/subschemas/vehicle.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/vehicle.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ "all", "audia7", "fesc20", "ff150", "ffocus18", "ftransit18", "haccord", "jgc21", "tsienna20", "vwtroc" ], "type": "string" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/schemas/subschemas/category.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/category.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ "interior", "exterior", "misc" ], "type": "string" }
BSD-3-Clause-Clear
en
monkvision/monkjs
5789f4436b3738e52d26c994e98ce17cd99a1e24
2023-05-22T13:54:32
packages/sights/research/schemas/sight.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "sight.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "allOf": [ { "if": { "properties": { "category": { "const": "exterior" }, "dev": { "anyOf": [ { "const": null }, { "const": false } ] } }, "required": [ "category" ] }, "then": { "required": [ "camera" ] } } ], "definitions": { "Camera": { "$ref": "subschemas/camera.schema" }, "Category": { "$ref": "subschemas/category.schema" }, "Task": { "$ref": "subschemas/task.schema" }, "VehicleType": { "$ref": "subschemas/vehicleType.schema" } }, "properties": { "angle_order": { "maximum": 360, "minimum": 0, "type": "number" }, "camera": { "$ref": "#/definitions/Camera" }, "category": { "$ref": "#/definitions/Category" }, "dev": { "type": "boolean" }, "label": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "overlay": { "type": "string" }, "tasks": { "$ref": "#/definitions/Task" }, "vehicle_type": { "$ref": "#/definitions/VehicleType" } }, "required": [ "category", "label", "overlay", "vehicle_type", "tasks" ], "type": "object" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/schemas/sight.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "sight.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "allOf": [ { "if": { "properties": { "category": { "const": "exterior" } }, "required": [ "category" ] }, "then": { "required": [ "camera" ] } } ], "definitions": { "Camera": { "$ref": "subschemas/camera.schema" }, "Category": { "$ref": "subschemas/category.schema" }, "VehicleType": { "$ref": "subschemas/vehicleType.schema" } }, "properties": { "angle_order": { "maximum": 360, "minimum": 0, "type": "number" }, "camera": { "$ref": "#/definitions/Camera" }, "category": { "$ref": "#/definitions/Category" }, "label": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "overlay": { "type": "string" }, "vehicle_type": { "$ref": "#/definitions/VehicleType" } }, "required": [ "category", "label", "overlay", "vehicle_type" ], "type": "object" }
BSD-3-Clause-Clear
en
monkvision/monkjs
dee9704b5ef7426b9abe3532d6a29cae12e4c728
2023-11-13T09:27:21
packages/sights/research/schemas/labels.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "labels.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "patternProperties": { "": { "properties": { "de": { "type": "string" }, "en": { "type": "string" }, "fr": { "type": "string" }, "key": { "type": "string" } }, "required": [ "key", "en", "fr", "de" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/haccord/haccord.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "haccord.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^haccord-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^haccord-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "haccord-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
d7e2a9aab06be6741361dab6bad80616125e4f2f
2023-10-04T14:04:06
packages/sights/research/schemas/subschemas/task.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/task.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "items": { "enum": [ "damage_detection", "wheel_analysis", "repair_estimate", "images_ocr", "image_editing", "inspection_pdf", "pricing", "dashboard_ocr" ], "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/data/all/all.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "all.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^all-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^all-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "all-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/schemas/vehicles.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "vehicles.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Vehicle": { "$ref": "subschemas/vehicle.schema" }, "VehicleType": { "$ref": "subschemas/vehicleType.schema" }, "xyzArray": { "$ref": "subschemas/xyzArray.schema" } }, "patternProperties": { "": { "properties": { "dimensions_xyz": { "$ref": "#/definitions/xyzArray" }, "id": { "$ref": "#/definitions/Vehicle" }, "make": { "type": "string" }, "model": { "type": "string" }, "type": { "$ref": "#/definitions/VehicleType" } }, "required": [ "make", "model", "type" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z\\d_]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/schemas/subschemas/category.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/category.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ "interior", "exterior", "misc" ], "type": "string" }
BSD-3-Clause-Clear
en
monkvision/monkjs
dee9704b5ef7426b9abe3532d6a29cae12e4c728
2023-11-13T09:27:21
packages/sights/research/schemas/vehicles.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "vehicles.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Vehicle": { "$ref": "subschemas/vehicle.schema" }, "VehicleType": { "$ref": "subschemas/vehicleType.schema" }, "xyzArray": { "$ref": "subschemas/xyzArray.schema" } }, "patternProperties": { "": { "properties": { "dimensions_xyz": { "$ref": "#/definitions/xyzArray" }, "id": { "$ref": "#/definitions/Vehicle" }, "make": { "type": "string" }, "model": { "type": "string" }, "type": { "$ref": "#/definitions/VehicleType" } }, "required": [ "make", "model", "type" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z\\d_]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
5789f4436b3738e52d26c994e98ce17cd99a1e24
2023-05-22T13:54:32
packages/sights/research/schemas/subschemas/task.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/task.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "items": { "enum": [ "damage_detection", "wheels_analysis", "repair_estimate", "images_ocr" ], "type": "string" }, "maxItems": 4, "minItems": 1, "type": "array" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/data/tsienna20/tsienna20.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "tsienna20.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^tsienna20-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^tsienna20-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "tsienna20-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/schemas/vehicles.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "vehicles.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "xyzArray": { "$ref": "subschemas/xyzArray.schema" } }, "patternProperties": { "": { "properties": { "dimensions_xyz": { "$ref": "#/definitions/xyzArray" }, "make": { "type": "string" }, "model": { "type": "string" }, "type": { "type": "string" } }, "required": [ "make", "model", "type" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z\\d_]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/data/ffocus18/ffocus18.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "ffocus18.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^ffocus18-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^ffocus18-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "ffocus18-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/audia7/audia7.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "audia7.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^audia7-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^audia7-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "audia7-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/ftransit18/ftransit18.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "ftransit18.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^ftransit18-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^ftransit18-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "ftransit18-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/schemas/subschemas/camera.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/camera.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "xyzArray": { "$ref": "xyzArray.schema" } }, "properties": { "focal_length": { "minimum": 0, "type": "number" }, "location_xyz": { "$ref": "#/definitions/xyzArray" }, "name": { "type": "string" }, "rotation_xyz_deg": { "$ref": "#/definitions/xyzArray" } }, "required": [ "focal_length", "location_xyz", "name", "rotation_xyz_deg" ], "type": "object" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/data/audia7/audia7.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "audia7.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^audia7-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^audia7-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "audia7-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/schemas/subschemas/vehicleType.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/vehicleType.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ "all", "audia7", "fesc20", "ff150", "ffocus18", "ftransit18", "haccord", "jgc21", "tsienna20", "vwtroc" ], "type": "string" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/data/fesc20/fesc20.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "fesc20.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^fesc20-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^fesc20-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "fesc20-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/schemas/labels.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "labels.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "patternProperties": { "": { "properties": { "de": { "type": "string" }, "en": { "type": "string" }, "fr": { "type": "string" }, "key": { "type": "string" } }, "required": [ "key", "en", "fr", "de" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
cf716342a50914935affc67b2217e36613baf6fe
2024-05-06T14:32:53
packages/sights/research/schemas/labels.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "labels.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "patternProperties": { "": { "properties": { "de": { "type": "string" }, "en": { "type": "string" }, "fr": { "type": "string" }, "key": { "type": "string" }, "nl": { "type": "string" } }, "required": [ "key", "en", "fr", "de", "nl" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/schemas/subschemas/vehicle.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "subschemas/vehicle.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "enum": [ "all", "audia7", "fesc20", "ff150", "ffocus18", "ftransit18", "haccord", "jgc21", "tsienna20", "vwtroc" ], "type": "string" }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/jgc21/jgc21.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "jgc21.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^jgc21-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^jgc21-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "jgc21-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
2476ccaf9eb327963b924667ceb05cb88d9ff95a
2023-03-21T14:27:51
packages/sights/research/schemas/sight.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "sight.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "allOf": [ { "if": { "properties": { "category": { "const": "exterior" }, "dev": { "anyOf": [ { "const": null }, { "const": false } ] } }, "required": [ "category" ] }, "then": { "required": [ "camera" ] } } ], "definitions": { "Camera": { "$ref": "subschemas/camera.schema" }, "Category": { "$ref": "subschemas/category.schema" }, "VehicleType": { "$ref": "subschemas/vehicleType.schema" } }, "properties": { "angle_order": { "maximum": 360, "minimum": 0, "type": "number" }, "camera": { "$ref": "#/definitions/Camera" }, "category": { "$ref": "#/definitions/Category" }, "dev": { "type": "boolean" }, "label": { "pattern": "[a-z]+(.[a-z]+)*", "type": "string" }, "overlay": { "type": "string" }, "vehicle_type": { "$ref": "#/definitions/VehicleType" } }, "required": [ "category", "label", "overlay", "vehicle_type" ], "type": "object" }
BSD-3-Clause-Clear
en
monkvision/monkjs
b57959910a1d1563cebba15154f41fe623c18d44
2023-02-02T14:36:58
packages/sights/research/data/ftransit18/ftransit18.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "ftransit18.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^ftransit18-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^ftransit18-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "ftransit18-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/tsienna20/tsienna20.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "tsienna20.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^tsienna20-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^tsienna20-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "tsienna20-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
monkvision/monkjs
252ffc574c2efc8cda234f56c5853c8c4028f7e4
2024-03-06T09:49:27
packages/sights/research/data/vwtroc/vwtroc.schema.json
27
2024-05-28T05:58:52.120793Z
{ "$id": "vwtroc.schema", "$schema": "https://json-schema.org/draft/2020-12/schema", "definitions": { "Sight": { "$ref": "sight.schema" } }, "patternProperties": { "": { "allOf": [ { "$ref": "#/definitions/Sight" } ], "properties": { "id": { "pattern": "^vwtroc-[a-zA-Z\\d_-]+$", "type": "string" }, "mirror_sight": { "pattern": "^vwtroc-[a-zA-Z\\d_-]+$", "type": "string" } }, "required": [ "id" ], "type": "object", "unevaluatedProperties": false } }, "propertyNames": { "pattern": "vwtroc-[a-zA-Z\\d_-]+", "type": "string" }, "type": "object", "unevaluatedProperties": false }
BSD-3-Clause-Clear
en
microsoft/mdatp-devicecontrol
6ebe15de663f8bc0bd9ae7fb28b1ea3ab8911e64
2024-03-31T10:21:28
macOS/policy/device_control_policy_schema.json
40
2024-05-28T04:52:12.012991Z
{ "$defs": { "allowEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "allow" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "disable_audit_allow" ] }, "title": "Options to control the behavior of allow events", "type": "array", "uniqueItems": true } }, "required": [ "$type" ], "title": "Access should be allowed" }, "appleDeviceEntry": { "additionalProperties": false, "examples": [ { "$type": "appleDevice", "access": [ "download_files_from_device", "sync_content_to_device", "backup_device", "update_device", "download_photos_from_device" ], "enforcement": { "$type": "allow", "options": [ "disable_audit_deny", "disable_audit_allow" ] }, "id": "34aec8e5-e2fa-4d1e-8788-2b1284226653" } ], "properties": { "$type": { "enum": [ "appleDevice" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "download_files_from_device", "sync_content_to_device", "backup_device", "update_device", "download_photos_from_device" ], "examples": [ "download_files_from_device" ], "title": "Apple specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry to control actions for apple devices" }, "auditAllowEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "auditAllow" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "send_event" ] }, "minItems": 1, "title": "Options to control the logging of allow events", "type": "array", "uniqueItems": true } }, "required": [ "$type", "options" ], "title": "Access should be allowed" }, "auditDenyEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "auditDeny" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "send_event", "show_notification" ] }, "minItems": 1, "title": "Options to control the logging of block events", "type": "array", "uniqueItems": true } }, "required": [ "$type", "options" ], "title": "Deny events should be audited" }, "bluetoothDeviceEntry": { "additionalProperties": false, "properties": { "$type": { "enum": [ "bluetoothDevice" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "download_files_from_device", "send_files_to_device" ], "examples": [ "send_files_to_device" ], "title": "Bluetooth Device specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry for a bluetooth device" }, "clauses": { "encryption": { "additionalProperties": false, "description": "Match if a device is encrypted. (Only supports Removable Media Devices)", "examples": [ { "$type": "encryption", "value": "apfs" } ], "properties": { "$type": { "enum": [ "encryption" ] }, "__comments": { "type": "string" }, "value": { "enum": [ "apfs" ], "examples": [ "apfs" ], "title": "Encryption Type" } }, "required": [ "$type", "value" ], "title": "Encryption Clause" }, "groupId": { "additionalProperties": false, "description": "Match if a device is a member of a different group. Note: ID must belong to a group that was defined prior to this clause.", "examples": [ { "$type": "groupId", "value": "3f082cd3-f701-4c21-9a6a-ed115c28e217" } ], "properties": { "$type": { "enum": [ "groupId" ] }, "__comments": { "type": "string" }, "value": { "$ref": "#/$defs/uuid", "title": "Group ID" } }, "required": [ "$type", "value" ], "title": "Group ID Clause" }, "primaryId": { "additionalProperties": false, "description": "Match a device to an overall device family", "examples": [ { "$type": "primaryId", "value": "apple_devices" } ], "properties": { "$type": { "enum": [ "primaryId" ] }, "__comments": { "type": "string" }, "value": { "enum": [ "apple_devices", "removable_media_devices", "bluetooth_devices", "portable_devices" ], "title": "The device family" } }, "required": [ "$type", "value" ], "title": "Primary ID Clause" }, "productId": { "additionalProperties": false, "description": "Match a device with a specific product ID", "examples": [ { "$type": "productId", "value": "12AB" } ], "properties": { "$type": { "enum": [ "productId" ] }, "__comments": { "type": "string" }, "value": { "pattern": "^[a-fA-F0-9]{4}$", "title": "4 digit product ID in hexadecimal", "type": "string" } }, "required": [ "$type", "value" ], "title": "Product ID Clause" }, "serialNumber": { "additionalProperties": false, "description": "Match a device with a specific serial number", "examples": [ { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" } ], "properties": { "$type": { "enum": [ "serialNumber" ] }, "__comments": { "type": "string" }, "value": { "title": "Serial Number", "type": "string" } }, "required": [ "$type", "value" ], "title": "Serial Number Clause" }, "vendorId": { "additionalProperties": false, "description": "Match a device with a specific vendor ID", "examples": [ { "$type": "vendorId", "value": "1234" } ], "properties": { "$type": { "enum": [ "vendorId" ] }, "__comments": { "type": "string" }, "value": { "pattern": "^[a-fA-F0-9]{4}$", "title": "4 digit vendor ID in hexadecimal", "type": "string" } }, "required": [ "$type", "value" ], "title": "Vendor ID Clause" } }, "denyEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "deny" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "disable_audit_deny" ] }, "title": "Options to control the behavior of block events", "type": "array", "uniqueItems": true } }, "required": [ "$type" ], "title": "Access should be denied" }, "deviceGroup": { "additionalProperties": false, "examples": [ { "$type": "device", "id": "3f082cd3-f701-4c21-9a6a-ed115c28e217", "name": "All Apple Devices", "query": { "$type": "all", "clauses": [ { "$type": "primaryId", "value": "apple_devices" } ] } } ], "properties": { "$type": { "enum": [ "device" ] }, "__comments": { "type": "string" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID representing a unique ID for this device group." }, "name": { "examples": [ "All Apple Devices", "Dev Devices" ], "title": "A friendly name for the group", "type": "string" }, "query": { "$ref": "#/$defs/groups/device/query" } }, "required": [ "$type", "id", "name", "query" ], "title": "Identifies a specific group of devices", "type": "object" }, "enforcement": { "oneOf": [ { "$ref": "#/$defs/denyEnforcement" }, { "$ref": "#/$defs/allowEnforcement" }, { "$ref": "#/$defs/auditDenyEnforcement" }, { "$ref": "#/$defs/auditAllowEnforcement" } ] }, "genericEntry": { "additionalProperties": false, "examples": [ { "$type": "generic", "access": [ "generic_read", "generic_write", "generic_execute" ], "enforcement": { "$type": "deny" }, "id": "34aec8e5-e2fa-4d1e-8788-2b1284226653" } ], "properties": { "$type": { "enum": [ "generic" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "generic_read", "generic_write", "generic_execute" ], "examples": [ "generic_read" ], "title": "Generic access types" }, "minItems": 1, "title": "The access kind to control. Will be translated into device specific access kinds.", "type": "array", "uniqueItems": true }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry to generically control actions" }, "groups": { "device": { "binaryQuery": { "additionalProperties": false, "examples": [ { "$type": "all", "clauses": [ { "$type": "primaryId", "value": "apple_devices" } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "1234" }, { "$type": "productId", "value": "4321" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4321" }, { "$type": "productId", "value": "1234" } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "2222" }, { "$type": "productId", "value": "3333" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4444" } ] } ] } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "12345" }, { "$type": "productId", "value": "AZ" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" } ] } ], "properties": { "$type": { "enum": [ "any", "or", "all", "and" ], "examples": [ "all", "any" ], "title": "Describes how this query combines clauses" }, "__comments": { "type": "string" }, "clauses": { "items": { "oneOf": [ { "$ref": "#/$defs/clauses/primaryId" }, { "$ref": "#/$defs/clauses/vendorId" }, { "$ref": "#/$defs/clauses/productId" }, { "$ref": "#/$defs/clauses/serialNumber" }, { "$ref": "#/$defs/clauses/groupId" }, { "$ref": "#/$defs/clauses/encryption" }, { "$ref": "#/$defs/groups/device/query" } ], "title": "An individual clause to match against a device", "type": "object" }, "minItems": 1, "title": "Clauses to evaluate", "type": "array" } }, "required": [ "$type", "clauses" ], "title": "A query which describes the devices to include in this group", "type": "object" }, "query": { "oneOf": [ { "$ref": "#/$defs/groups/device/binaryQuery" }, { "$ref": "#/$defs/groups/device/unaryQuery" } ] }, "unaryQuery": { "additionalProperties": false, "examples": [ { "$type": "not", "query": { "$type": "and", "clauses": [ { "$type": "primaryId", "value": "apple_devices" }, { "$type": "primaryId", "value": "other_devices" } ] } } ], "properties": { "$type": { "enum": [ "not" ], "examples": [ "not" ], "title": "Negates the result of the contained query" }, "__comments": { "type": "string" }, "query": { "$ref": "#/$defs/groups/device/query" } }, "required": [ "$type", "query" ], "title": "A query which describes the devices to include in this group", "type": "object" } } }, "portableDeviceEntry": { "additionalProperties": false, "properties": { "$type": { "enum": [ "portableDevice" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "download_files_from_device", "send_files_to_device", "download_photos_from_device", "debug" ], "examples": [ "send_files_to_device" ], "title": "Portable Device specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry for a portable device" }, "removableMediaEntry": { "additionalProperties": false, "properties": { "$type": { "enum": [ "removableMedia" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "read", "write", "execute" ], "examples": [ "read" ], "title": "Removable Media specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "conditions": { "$ref": "#/$defs/conditions/removableMedia" }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry for a removable media device" }, "uuid": { "examples": [ "34aec8e5-e2fa-4d1e-8788-2b1284226653" ], "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "type": "string" } }, "$schema": "https://json-schema.org/draft/2019-09/schema", "additionalProperties": false, "default": {}, "examples": [ { "groups": [ { "$type": "device", "id": "3f082cd3-f701-4c21-9a6a-ed115c28e217", "name": "All Apple Devices", "query": { "$type": "all", "clauses": [ { "$type": "primaryId", "value": "apple_devices" } ] } }, { "$type": "device", "id": "34aec8e5-e2fa-4d1e-8788-2b1284226653", "query": { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "1234" }, { "$type": "productId", "value": "4321" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4321" }, { "$type": "productId", "value": "1234" } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "2222" }, { "$type": "productId", "value": "3333" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4444" } ] } ] } ] } }, { "$type": "device", "id": "03f025f6-ee9d-49b2-b192-fc7a00df6856", "name": "Dev Machines", "query": { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "12345" }, { "$type": "productId", "value": "AZ" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" } ] } } ], "rules": [ { "entries": [ { "$type": "appleDevice", "access": [ "download_files_from_device", "sync_content_to_device", "backup_device", "update_device", "download_photos_from_device" ], "enforcement": { "$type": "allow", "options": [ "disable_audit_deny", "disable_audit_allow" ] } }, { "$type": "generic", "access": [ "generic_read", "generic_write", "generic_execute" ], "enforcement": { "$type": "deny" } } ], "excludeGroups": [ "34aec8e5-e2fa-4d1e-8788-2b1284226653" ], "id": "772cef80-229f-48b4-bd17-a6913009298d", "includeGroups": [ "3f082cd3-f701-4c21-9a6a-ed115c28e217" ], "name": "Test Rule #1" }, { "entries": [ { "$type": "appleDevice", "access": [ "update_device" ], "enforcement": { "$type": "allow" } } ], "id": "bfabe24b-37a6-4bc0-9778-421aeaeece23", "includeGroups": [ "03f025f6-ee9d-49b2-b192-fc7a00df6856", "03f025f6-ee9d-49b2-b192-fc7a00df6857", "3f082cd3-f701-4c21-9a6a-ed115c28e217" ], "name": "Test Rule #2" } ], "settings": { "features": { "appleDevice": { "disable": false }, "bluetoothDevice": { "disable": false }, "portableDevice": { "disable": true }, "removableMedia": { "disable": null } }, "global": { "defaultEnforcement": "deny" }, "ux": { "navigationTarget": "http://www.microsoft.com" } } } ], "properties": { "__comments": { "type": "string" }, "groups": { "items": { "oneOf": [ { "$ref": "#/$defs/deviceGroup" }, { "$ref": "#/$defs/fileGroup" }, { "$ref": "#/$defs/userGroup" } ], "title": "A group", "type": "object" }, "minItems": 1, "title": "Groups to be used within rules", "type": "array" }, "rules": { "items": { "additionalProperties": false, "properties": { "__comments": { "type": "string" }, "entries": { "items": { "oneOf": [ { "$ref": "#/$defs/appleDeviceEntry" }, { "$ref": "#/$defs/removableMediaEntry" }, { "$ref": "#/$defs/bluetoothDeviceEntry" }, { "$ref": "#/$defs/portableDeviceEntry" }, { "$ref": "#/$defs/genericEntry" } ], "title": "A rule entry", "type": "object" }, "minItems": 1, "title": "The enforcement behavior for this rule. Entries are traversed in order, and the first match dictates the action taken.", "type": "array" }, "excludeGroups": { "items": { "$ref": "#/$defs/uuid", "title": "UUID of a device group" }, "minItems": 0, "title": "List of device groups which override the applicability logic of includeGroups. Membership in any of these groups (logical OR) will disable the rule for a device.", "type": "array" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID to uniquely identify this rule." }, "includeGroups": { "items": { "$ref": "#/$defs/uuid", "title": "UUID of a device group" }, "minItems": 0, "title": "List of all the device groups that a device must be a member of (logical AND) for this rule to be applicable.", "type": "array" }, "name": { "examples": [ "Removable Media: Read Only", "Test Rule #1" ], "title": "Friendly name for the rule", "type": "string" } }, "required": [ "id", "name", "entries" ], "title": "A device control rule", "type": "object" }, "minItems": 1, "title": "The rules which define the behavior of device control for a group of devices", "type": "array" }, "settings": { "additionalProperties": false, "default": {}, "examples": [ { "features": { "appleDevice": { "disable": false } }, "global": { "defaultEnforcement": "deny" }, "ux": { "navigationTarget": "http://www.microsoft.com" } } ], "properties": { "__comments": { "type": "string" }, "features": { "additionalProperties": false, "default": {}, "examples": [ { "appleDevice": { "disable": false } } ], "properties": { "__comments": { "type": "string" }, "appleDevice": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ false ], "title": "Disable the Apple Devices feature?", "type": "boolean" } }, "title": "Settings for Apple Devices", "type": "object" }, "bluetoothDevice": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ true ], "title": "Disable the Bluetooth Devices feature?", "type": "boolean" } }, "title": "Settings for Bluetooth Devices", "type": "object" }, "portableDevice": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ true ], "title": "Disable the Portable Devices feature?", "type": "boolean" } }, "title": "Settings for Portable Devices", "type": "object" }, "removableMedia": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ false ], "title": "Disable the Removable Media feature?", "type": "boolean" } }, "title": "Settings for Removable Media Devices", "type": "object" } }, "title": "Feature specific settings", "type": "object" }, "global": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "defaultEnforcement": { "default": "allow", "enum": [ "allow", "deny" ], "examples": [ "deny" ], "title": "Default Enforcement if no rules match an action." } }, "title": "Global Settings", "type": "object" }, "ux": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "navigationTarget": { "examples": [ "http://www.microsoft.com" ], "title": "URI to direct users to if the UX notification is clicked.", "type": "string" } }, "title": "UX settings", "type": "object" } }, "title": "Settings to control Device Control", "type": "object" } }, "required": [ "groups", "rules", "settings" ], "title": "Device Control for macOS policy file", "type": "object" }
MIT
en
microsoft/mdatp-devicecontrol
a63f5629dbf472583881a19df385c040513d893c
2024-04-21T23:51:45
python/package_schema.json
40
2024-05-28T04:52:12.012991Z
{ "$defs": { "assignmentsType": { "description": "Groups the policy is assigned of excluded from", "items": { "description": "A target included/excluded for the policy", "properties": { "group": { "properties": { "name": { "description": "The name of the group", "type": "string" } }, "type": "object" }, "type": { "oneOf": [ { "description": "The group is targeted", "pattern": "include", "type": "string" }, { "description": "The group is excluded", "pattern": "exclude", "type": "string" } ] } }, "required": [ "type", "group" ], "type": "object" }, "type": "array" }, "descriptionType": { "description": "Description of the object", "type": "string" }, "fileType": { "description": "A file that is referenced by the package", "properties": { "path": { "description": "Path to the file", "type": "string" }, "sha256": { "description": "The SHA256 hash of the file", "type": "string" } }, "required": [ "path", "sha256" ], "type": "object" }, "groupType": { "description": "The name of the group", "properties": { "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" } }, "required": [ "file", "description" ], "type": "object" }, "groupsType": { "additionalProperties": { "$ref": "#/$defs/groupType", "type": "object" }, "description": "Groups in the policy" }, "macPolicy": { "description": "Mac device control policy", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" }, "os": { "description": "The operating system for the policy", "pattern": "macOS", "type": "string" }, "version": { "description": "The version v1 or v2 for the policy", "pattern": "v1", "type": "string" } }, "type": "object" }, "ruleType": { "description": "The name of the rule", "properties": { "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" } }, "required": [ "file", "description" ], "type": "object" }, "rulesType": { "additionalProperties": { "$ref": "#/$defs/ruleType", "type": "object" }, "description": "Rules in the policy" }, "v1settingType": { "description": "The ID of the setting", "properties": { "description": { "description": "The description of the setting in OMA-URI", "type": "string" }, "name": { "description": "The name of the setting in the OMA-URI", "type": "string" }, "value": { "description": " The value of the setting", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "array" } ] } }, "required": [ "value", "name", "description" ], "type": "object" }, "v1settingsType": { "additionalProperties": { "$ref": "#/$defs/v1settingType", "type": "object" }, "description": "Settings in the policy" }, "v2settingType": { "description": "The ID of the setting", "properties": { "value": { "description": " The value of the setting", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "array" } ] } }, "required": [ "value" ], "type": "object" }, "v2settingsType": { "additionalProperties": { "$ref": "#/$defs/v2settingType", "type": "object" }, "description": "Settings in the policy" }, "windowsV1Policy": { "description": "A v1 Windows device control policy based on OMA-URI", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "groups": { "$ref": "#/$defs/groupsType" }, "os": { "description": "The operating system for the policy", "pattern": "windows", "type": "string" }, "rules": { "$ref": "#/$defs/rulesType" }, "settings": { "$ref": "#/$defs/v1settingsType" }, "version": { "description": "The version v1 or v2 for the policy", "pattern": "v1", "type": "string" } }, "type": "object" }, "windowsV2Policy": { "description": "A v2 Windows device control policy based on Intune UX", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "groups": { "$ref": "#/$defs/groupsType" }, "os": { "pattern": "windows", "type": "string" }, "rules": { "$ref": "#/$defs/rulesType" }, "settings": { "$ref": "#/$defs/v2settingsType" }, "version": { "pattern": "v2", "type": "string" } }, "type": "object" } }, "$id": "https://github.com/microsoft/mdatp-devicecontrol/package_schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A schema for the package.json", "properties": { "policies": { "additionalProperties": { "oneOf": [ { "$ref": "#/$defs/windowsV2Policy" }, { "$ref": "#/$defs/windowsV1Policy" }, { "$ref": "#/$defs/macPolicy" } ], "type": "object" }, "description": "The policies in the package" } }, "title": "MDE Device Control Package Schema", "type": "object" }
MIT
en
microsoft/mdatp-devicecontrol
0bd72e1afa904cb10ade7afcb99324db0f257ffd
2024-04-22T02:46:51
python/package_schema.json
40
2024-05-28T04:52:12.012991Z
{ "$defs": { "assignmentMetadataType": { "description": "Name of the group assigned the policy", "properties": { "assignment_id": { "type": "string" }, "assignment_source_id": { "$ref": "#/$defs/graphIdType" }, "id": { "$ref": "#/$defs/graphIdType" } }, "required": [ "assignment_id", "assignment_source_id" ], "type": "object" }, "assignmentsMetadataType": { "additionalProperties": { "$ref": "#/$defs/assignmentMetadataType", "type": "object" }, "description": "The metadata for the assignments", "type": "object" }, "assignmentsType": { "description": "Groups the policy is assigned of excluded from", "items": { "description": "A target included/excluded for the policy", "properties": { "group": { "properties": { "name": { "description": "The name of the group", "type": "string" } }, "type": "object" }, "type": { "oneOf": [ { "description": "The group is targeted", "pattern": "include", "type": "string" }, { "description": "The group is excluded", "pattern": "exclude", "type": "string" } ] } }, "required": [ "type", "group" ], "type": "object" }, "type": "array" }, "descriptionType": { "description": "Description of the object", "type": "string" }, "fileType": { "description": "A file that is referenced by the package", "properties": { "path": { "description": "Path to the file", "type": "string" }, "sha256": { "description": "The SHA256 hash of the file", "type": "string" } }, "required": [ "path", "sha256" ], "type": "object" }, "graphIdType": { "description": "Id of the object in the graph", "pattern": "([a-f]|[0-9]){8}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){12}", "type": "string" }, "groupType": { "description": "The name of the group", "properties": { "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" } }, "required": [ "file", "description" ], "type": "object" }, "groupV1MetadataType": { "description": "Name of the group (V1)", "properties": { "id": { "$ref": "#/$defs/guidType" } }, "required": [ "id" ], "type": "object" }, "groupV2MetadataType": { "description": "Name of the group (V2)", "properties": { "@odata.context": { "pattern": "https://graph.microsoft.com/beta/\\$metadata#deviceManagement/reusablePolicySettings\\(settingInstance,id,displayName,description\\)/\\$entity", "type": "string" }, "groupdata_id": { "$ref": "#/$defs/guidType" }, "id": { "$ref": "#/$defs/graphIdType" } }, "required": [ "groupdata_id", "id", "@data.context" ], "type": "object" }, "groupsType": { "additionalProperties": { "$ref": "#/$defs/groupType", "type": "object" }, "description": "Groups in the policy" }, "groupsV1MetadataType": { "additionalProperties": { "$ref": "#/$defs/groupV1MetadataType", "type": "object" }, "description": "The metadata for the groups (V1)", "type": "object" }, "groupsV2MetadataType": { "additionalProperties": { "$ref": "#/$defs/groupV2MetadataType", "type": "object" }, "description": "The metadata for the groups (V2)", "type": "object" }, "guidType": { "description": "GUID of the device control object", "pattern": "\\{([a-f]|[0-9]){8}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){12}\\}", "type": "string" }, "macPolicy": { "description": "Mac device control policy", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" }, "os": { "description": "The operating system for the policy", "pattern": "macOS", "type": "string" }, "version": { "description": "The version v1 or v2 for the policy", "pattern": "v1", "type": "string" } }, "type": "object" }, "macPolicyMetadata": { "description": "Metadata for a macOS policy", "properties": { "@odata.type": { "pattern": "#microsoft.graph.macOSCustomConfiguration", "type": "string" }, "id": { "$ref": "#/$defs/graphIdType" } }, "required": [ "@odata.type", "id" ], "type": "object" }, "ruleMetadataType": { "description": "Name of the rule", "properties": { "id": { "$ref": "#/$defs/guidType" } }, "type": "object" }, "ruleType": { "description": "The name of the rule", "properties": { "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" } }, "required": [ "file", "description" ], "type": "object" }, "rulesMetadataType": { "additionalProperties": { "$ref": "#/$defs/ruleMetadataType", "type": "object" }, "description": "The metadata for the rules", "type": "object" }, "rulesType": { "additionalProperties": { "$ref": "#/$defs/ruleType", "type": "object" }, "description": "Rules in the policy" }, "settingMetadataType": { "description": "The name of the setting", "properties": { "id": { "type": "number" } }, "type": "object" }, "settingsMetadataType": { "additionalProperties": { "$ref": "#/$defs/settingMetadataType", "type": "object" }, "description": "The metadata for the settings", "type": "object" }, "v1settingType": { "description": "The ID of the setting", "properties": { "description": { "description": "The description of the setting in OMA-URI", "type": "string" }, "name": { "description": "The name of the setting in the OMA-URI", "type": "string" }, "value": { "description": " The value of the setting", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "array" } ] } }, "required": [ "value", "name", "description" ], "type": "object" }, "v1settingsType": { "additionalProperties": { "$ref": "#/$defs/v1settingType", "type": "object" }, "description": "Settings in the policy" }, "v2settingType": { "description": "The ID of the setting", "properties": { "value": { "description": " The value of the setting", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "array" } ] } }, "required": [ "value" ], "type": "object" }, "v2settingsType": { "additionalProperties": { "$ref": "#/$defs/v2settingType", "type": "object" }, "description": "Settings in the policy" }, "windowsV1Policy": { "description": "A v1 Windows device control policy based on OMA-URI", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "groups": { "$ref": "#/$defs/groupsType" }, "os": { "description": "The operating system for the policy", "pattern": "windows", "type": "string" }, "rules": { "$ref": "#/$defs/rulesType" }, "settings": { "$ref": "#/$defs/v1settingsType" }, "version": { "description": "The version v1 or v2 for the policy", "pattern": "v1", "type": "string" } }, "type": "object" }, "windowsV1PolicyMetadata": { "description": "Metadata for a Windows v1 policy", "properties": { "@odata.context": { "pattern": "https://graph.microsoft.com/beta/\\$metadata#deviceManagement/deviceConfigurations/\\$entity", "type": "string" }, "@odata.type": { "pattern": "#microsoft.graph.windows10CustomConfiguration", "type": "string" }, "assignments": { "$ref": "#/$defs/assignmentsMetadataType" }, "groups": { "$ref": "#/$defs/groupsV1MetadataType" }, "id": { "$ref": "#/$defs/graphIdType" }, "rules": { "$ref": "#/$defs/rulesMetadataType" } }, "required": [ "@odata.type", "@odata.context", "id" ], "type": "object" }, "windowsV2Policy": { "description": "A v2 Windows device control policy based on Intune UX", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "groups": { "$ref": "#/$defs/groupsType" }, "os": { "pattern": "windows", "type": "string" }, "rules": { "$ref": "#/$defs/rulesType" }, "settings": { "$ref": "#/$defs/v2settingsType" }, "version": { "pattern": "v2", "type": "string" } }, "type": "object" }, "windowsV2PolicyMetadata": { "description": "Metadata for a Windows v2 policy", "properties": { "@odata.context": { "pattern": "https://graph.microsoft.com/beta/\\$metadata#deviceManagement/configurationPolicies/\\$entity", "type": "string" }, "groups": { "$ref": "#/$defs/groupsV2MetadataType" }, "id": { "$ref": "#/$defs/graphIdType" }, "settings": { "$ref": "#/$defs/settingsMetadataType" } }, "required": [ "@odata.context", "id" ], "type": "object" } }, "$id": "https://github.com/microsoft/mdatp-devicecontrol/package_schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A schema for the package.json", "properties": { "policies": { "additionalProperties": { "oneOf": [ { "$ref": "#/$defs/windowsV2Policy" }, { "$ref": "#/$defs/windowsV1Policy" }, { "$ref": "#/$defs/macPolicy" }, { "$ref": "#/$defs/macPolicyMetadata" }, { "$ref": "#/$defs/windowsV1PolicyMetadata" }, { "$ref": "#/$defs/windowsV2PolicyMetadata" } ], "type": "object" }, "description": "The policies in the package" } }, "title": "MDE Device Control Package Schema", "type": "object" }
MIT
en
microsoft/mdatp-devicecontrol
4a2e0c9d23b73fb26c846dc3216cc12adea9c940
2024-04-22T19:10:17
python/package_schema.json
40
2024-05-28T04:52:12.012991Z
{ "$defs": { "assignmentMetadataType": { "description": "Name of the group assigned the policy", "properties": { "assignment_id": { "type": "string" }, "assignment_source_id": { "$ref": "#/$defs/graphIdType" }, "id": { "$ref": "#/$defs/graphIdType" } }, "required": [ "assignment_id", "assignment_source_id" ], "type": "object" }, "assignmentsMetadataType": { "additionalProperties": { "$ref": "#/$defs/assignmentMetadataType", "type": "object" }, "description": "The metadata for the assignments", "type": "object" }, "assignmentsType": { "description": "Groups the policy is assigned of excluded from", "items": { "description": "A target included/excluded for the policy", "properties": { "group": { "properties": { "name": { "description": "The name of the group", "type": "string" } }, "type": "object" }, "type": { "oneOf": [ { "description": "The group is targeted", "pattern": "include", "type": "string" }, { "description": "The group is excluded", "pattern": "exclude", "type": "string" } ] } }, "required": [ "type", "group" ], "type": "object" }, "type": "array" }, "descriptionType": { "description": "Description of the object", "type": "string" }, "fileType": { "description": "A file that is referenced by the package", "properties": { "path": { "description": "Path to the file", "type": "string" }, "sha256": { "description": "The SHA256 hash of the file", "type": "string" } }, "required": [ "path", "sha256" ], "type": "object" }, "graphIdType": { "description": "Id of the object in the graph", "pattern": "([a-f]|[0-9]){8}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){12}", "type": "string" }, "groupType": { "description": "The name of the group", "properties": { "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" } }, "required": [ "file", "description" ], "type": "object" }, "groupV1MetadataType": { "description": "Name of the group (V1)", "properties": { "id": { "$ref": "#/$defs/guidType" } }, "required": [ "id" ], "type": "object" }, "groupV2MetadataType": { "description": "Name of the group (V2)", "properties": { "@odata.context": { "pattern": "https://graph.microsoft.com/beta/\\$metadata#deviceManagement/reusablePolicySettings\\(settingInstance,id,displayName,description\\)/\\$entity", "type": "string" }, "groupdata_id": { "$ref": "#/$defs/guidType" }, "id": { "$ref": "#/$defs/graphIdType" } }, "required": [ "groupdata_id", "id", "@data.context" ], "type": "object" }, "groupsType": { "additionalProperties": { "$ref": "#/$defs/groupType", "type": "object" }, "description": "Groups in the policy" }, "groupsV1MetadataType": { "additionalProperties": { "$ref": "#/$defs/groupV1MetadataType", "type": "object" }, "description": "The metadata for the groups (V1)", "type": "object" }, "groupsV2MetadataType": { "additionalProperties": { "$ref": "#/$defs/groupV2MetadataType", "type": "object" }, "description": "The metadata for the groups (V2)", "type": "object" }, "guidType": { "description": "GUID of the device control object", "pattern": "\\{([a-f]|[0-9]){8}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){4}-([a-f]|[0-9]){12}\\}", "type": "string" }, "macPolicy": { "description": "Mac device control policy", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" }, "os": { "description": "The operating system for the policy", "pattern": "macOS", "type": "string" }, "version": { "description": "The version v1 or v2 for the policy", "pattern": "v1", "type": "string" } }, "type": "object" }, "macPolicyMetadata": { "description": "Metadata for a macOS policy", "properties": { "@odata.type": { "pattern": "#microsoft.graph.macOSCustomConfiguration", "type": "string" }, "id": { "$ref": "#/$defs/graphIdType" } }, "required": [ "@odata.type", "id" ], "type": "object" }, "ruleMetadataType": { "description": "Name of the rule", "properties": { "id": { "$ref": "#/$defs/guidType" } }, "type": "object" }, "ruleType": { "description": "The name of the rule", "properties": { "description": { "$ref": "#/$defs/descriptionType" }, "file": { "$ref": "#/$defs/fileType" } }, "required": [ "file", "description" ], "type": "object" }, "rulesMetadataType": { "additionalProperties": { "$ref": "#/$defs/ruleMetadataType", "type": "object" }, "description": "The metadata for the rules", "type": "object" }, "rulesType": { "additionalProperties": { "$ref": "#/$defs/ruleType", "type": "object" }, "description": "Rules in the policy" }, "settingMetadataType": { "description": "The name of the setting", "properties": { "id": { "type": "number" } }, "type": "object" }, "settingsMetadataType": { "additionalProperties": { "$ref": "#/$defs/settingMetadataType", "type": "object" }, "description": "The metadata for the settings", "type": "object" }, "v1settingType": { "description": "The ID of the setting", "properties": { "description": { "description": "The description of the setting in OMA-URI", "type": "string" }, "name": { "description": "The name of the setting in the OMA-URI", "type": "string" }, "value": { "description": " The value of the setting", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "array" } ] } }, "required": [ "value", "name", "description" ], "type": "object" }, "v1settingsType": { "additionalProperties": { "$ref": "#/$defs/v1settingType", "type": "object" }, "description": "Settings in the policy" }, "v2settingType": { "description": "The ID of the setting", "properties": { "value": { "description": " The value of the setting", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "array" } ] } }, "required": [ "value" ], "type": "object" }, "v2settingsType": { "additionalProperties": { "$ref": "#/$defs/v2settingType", "type": "object" }, "description": "Settings in the policy" }, "windowsV1Policy": { "description": "A v1 Windows device control policy based on OMA-URI", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "groups": { "$ref": "#/$defs/groupsType" }, "os": { "description": "The operating system for the policy", "pattern": "windows", "type": "string" }, "rules": { "$ref": "#/$defs/rulesType" }, "settings": { "$ref": "#/$defs/v1settingsType" }, "version": { "description": "The version v1 or v2 for the policy", "pattern": "v1", "type": "string" } }, "type": "object" }, "windowsV1PolicyMetadata": { "description": "Metadata for a Windows v1 policy", "properties": { "@odata.context": { "pattern": "https://graph.microsoft.com/beta/\\$metadata#deviceManagement/deviceConfigurations/\\$entity", "type": "string" }, "@odata.type": { "pattern": "#microsoft.graph.windows10CustomConfiguration", "type": "string" }, "assignments": { "$ref": "#/$defs/assignmentsMetadataType" }, "groups": { "$ref": "#/$defs/groupsV1MetadataType" }, "id": { "$ref": "#/$defs/graphIdType" }, "rules": { "$ref": "#/$defs/rulesMetadataType" } }, "required": [ "@odata.type", "@odata.context", "id" ], "type": "object" }, "windowsV2Policy": { "description": "A v2 Windows device control policy based on Intune UX", "properties": { "assignments": { "$ref": "#/$defs/assignmentsType" }, "groups": { "$ref": "#/$defs/groupsType" }, "os": { "pattern": "windows", "type": "string" }, "rules": { "$ref": "#/$defs/rulesType" }, "settings": { "$ref": "#/$defs/v2settingsType" }, "version": { "pattern": "v2", "type": "string" } }, "type": "object" }, "windowsV2PolicyMetadata": { "description": "Metadata for a Windows v2 policy", "properties": { "@odata.context": { "pattern": "https://graph.microsoft.com/beta/\\$metadata#deviceManagement/configurationPolicies/\\$entity", "type": "string" }, "groups": { "$ref": "#/$defs/groupsV2MetadataType" }, "id": { "$ref": "#/$defs/graphIdType" }, "settings": { "$ref": "#/$defs/settingsMetadataType" } }, "required": [ "@odata.context", "id" ], "type": "object" } }, "$id": "https://github.com/microsoft/mdatp-devicecontrol/package_schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A schema for the package.json", "properties": { "policies": { "additionalProperties": { "oneOf": [ { "$ref": "#/$defs/windowsV2Policy" }, { "$ref": "#/$defs/windowsV1Policy" }, { "$ref": "#/$defs/macPolicy" }, { "$ref": "#/$defs/windowsV1PolicyMetadata" }, { "$ref": "#/$defs/windowsV2PolicyMetadata" }, { "$ref": "#/$defs/macPolicyMetadata" } ], "type": "object" }, "description": "The policies in the package" } }, "title": "MDE Device Control Package Schema", "type": "object" }
MIT
en
microsoft/mdatp-devicecontrol
7072f34798c5aba2f63b7941530dd9f66b014e57
2024-01-18T15:14:18
macOS/policy/device_control_policy_schema.json
40
2024-05-28T04:52:12.012991Z
{ "$defs": { "allowEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "allow" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "disable_audit_allow" ] }, "title": "Options to control the behavior of allow events", "type": "array", "uniqueItems": true }, "tag": { "examples": [ "42", "98765432100" ], "format": "uint64", "pattern": "^[0-9]+$", "title": "Custom tag to propogate to portal", "type": "string" } }, "required": [ "$type" ], "title": "Access should be allowed" }, "appleDeviceEntry": { "additionalProperties": false, "examples": [ { "$type": "appleDevice", "access": [ "download_files_from_device", "sync_content_to_device", "backup_device", "update_device", "download_photos_from_device" ], "enforcement": { "$type": "allow", "options": [ "disable_audit_deny", "disable_audit_allow" ] }, "id": "34aec8e5-e2fa-4d1e-8788-2b1284226653" } ], "properties": { "$type": { "enum": [ "appleDevice" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "download_files_from_device", "sync_content_to_device", "backup_device", "update_device", "download_photos_from_device" ], "examples": [ "download_files_from_device" ], "title": "Apple specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "conditions": { "$ref": "#/$defs/conditions/standard" }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry to control actions for apple devices" }, "applicationIdentifier": { "additionalProperties": false, "description": "Identifying information for an application. Only one property is required, if multiple are provided will match any process that satisfies any provided identifiers.", "examples": [ { "signingId": "com.microsoft.Word" }, { "executablePath": "/Applications/Contoso App.app/Contents/MacOS/unsigned", "signingId": "com.contoso.signed" } ], "minProperties": 1, "properties": { "__comments": { "type": "string" }, "executablePath": { "examples": [ "/Applications/Microsoft Word.app/Contents/MacOS/Microsoft Word" ], "title": "Full path to an executable", "type": "string" }, "processName": { "examples": [ "Microsoft Word" ], "title": "Name of executable", "type": "string" }, "signingId": { "examples": [ "com.microsoft.Word" ], "title": "The signing_id of an application", "type": "string" } }, "title": "Identify an application" }, "auditAllowEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "auditAllow" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "send_event" ] }, "minItems": 1, "title": "Options to control the logging of allow events", "type": "array", "uniqueItems": true } }, "required": [ "$type", "options" ], "title": "Access should be allowed" }, "auditDenyEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "auditDeny" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "send_event", "show_notification" ] }, "minItems": 1, "title": "Options to control the logging of block events", "type": "array", "uniqueItems": true } }, "required": [ "$type", "options" ], "title": "Deny events should be audited" }, "bluetoothDeviceEntry": { "additionalProperties": false, "properties": { "$type": { "enum": [ "bluetoothDevice" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "download_files_from_device", "send_files_to_device" ], "examples": [ "send_files_to_device" ], "title": "Bluetooth Device specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "conditions": { "$ref": "#/$defs/conditions/standard" }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry for a bluetooth device" }, "clauses": { "aadObjectId": { "additionalProperties": false, "description": "Match against an AzureAD object ID", "examples": [ { "type": "aadObjectId", "value": "FE09D726-F582-479E-A737-AAAEE124864F" } ], "properties": { "$type": { "enum": [ "aadObjectId" ] }, "__comments": { "type": "string" }, "value": { "$ref": "#/$defs/uuid" } }, "required": [ "$type", "value" ], "title": "AzureAD Object ID Clause" }, "encryption": { "additionalProperties": false, "description": "Match if a device is encrypted. (Only supports Removable Media Devices)", "examples": [ { "$type": "encryption", "value": "apfs" } ], "properties": { "$type": { "enum": [ "encryption" ] }, "__comments": { "type": "string" }, "value": { "enum": [ "apfs" ], "examples": [ "apfs" ], "title": "Encryption Type" } }, "required": [ "$type", "value" ], "title": "Encryption Clause" }, "fileType": { "additionalProperties": false, "description": "Match against a file type. (Only supports Removable Media Devices)", "examples": [ { "$type": "fileType", "value": ".exe" } ], "properties": { "$type": { "enum": [ "fileType" ] }, "__comments": { "type": "string" }, "value": { "examples": [ ".exe", ".ps1", ".txt" ], "pattern": "^\\.\\w+$", "title": "File Type", "type": "string" } }, "required": [ "$type", "value" ], "title": "File Type" }, "groupId": { "additionalProperties": false, "description": "Match if a device is a member of a different group. Note: ID must belong to a group that was defined prior to this clause.", "examples": [ { "$type": "groupId", "value": "3f082cd3-f701-4c21-9a6a-ed115c28e217" } ], "properties": { "$type": { "enum": [ "groupId" ] }, "__comments": { "type": "string" }, "value": { "$ref": "#/$defs/uuid", "title": "Group ID" } }, "required": [ "$type", "value" ], "title": "Group ID Clause" }, "primaryId": { "additionalProperties": false, "description": "Match a device to an overall device family", "examples": [ { "$type": "primaryId", "value": "apple_devices" } ], "properties": { "$type": { "enum": [ "primaryId" ] }, "__comments": { "type": "string" }, "value": { "enum": [ "apple_devices", "removable_media_devices", "bluetooth_devices", "portable_devices" ], "title": "The device family" } }, "required": [ "$type", "value" ], "title": "Primary ID Clause" }, "productId": { "additionalProperties": false, "description": "Match a device with a specific product ID", "examples": [ { "$type": "productId", "value": "12AB" } ], "properties": { "$type": { "enum": [ "productId" ] }, "__comments": { "type": "string" }, "value": { "pattern": "^[a-fA-F0-9]{4}$", "title": "4 digit product ID in hexadecimal", "type": "string" } }, "required": [ "$type", "value" ], "title": "Product ID Clause" }, "securityIdentifier": { "additionalProperties": false, "description": "Match against a specific security identifier.", "examples": [ { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141850" } ], "properties": { "$type": { "enum": [ "securityIdentifier" ] }, "__comments": { "type": "string" }, "value": { "$ref": "#/$defs/sid" } }, "required": [ "$type", "value" ], "title": "Security Identifier Clause" }, "serialNumber": { "additionalProperties": false, "description": "Match a device with a specific serial number", "examples": [ { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" } ], "properties": { "$type": { "enum": [ "serialNumber" ] }, "__comments": { "type": "string" }, "value": { "title": "Serial Number", "type": "string" } }, "required": [ "$type", "value" ], "title": "Serial Number Clause" }, "vendorId": { "additionalProperties": false, "description": "Match a device with a specific vendor ID", "examples": [ { "$type": "vendorId", "value": "1234" } ], "properties": { "$type": { "enum": [ "vendorId" ] }, "__comments": { "type": "string" }, "value": { "pattern": "^[a-fA-F0-9]{4}$", "title": "4 digit vendor ID in hexadecimal", "type": "string" } }, "required": [ "$type", "value" ], "title": "Vendor ID Clause" } }, "conditions": { "clause": { "file": { "additionalProperties": false, "properties": { "$type": { "enum": [ "file" ] }, "groupId": { "$ref": "#/$defs/uuid", "title": "File Group ID" } }, "required": [ "$type", "groupId" ], "title": "A file condition" }, "user": { "additionalProperties": false, "properties": { "$type": { "enum": [ "user" ] }, "groupId": { "$ref": "#/$defs/uuid", "title": "User Group ID" } }, "required": [ "$type", "groupId" ], "title": "A user condition" } }, "removableMedia": { "additionalProperties": false, "properties": { "$type": { "enum": [ "any", "or", "all", "and" ] }, "values": { "items": { "oneOf": [ { "$ref": "#/$defs/conditions/clause/user" }, { "$ref": "#/$defs/conditions/clause/file" } ] }, "minItems": 1, "title": "The conditions to use", "type": "array" } }, "required": [ "$type", "values" ], "title": "Conditions for a removable_media entry" }, "standard": { "additionalProperties": false, "properties": { "$type": { "enum": [ "any", "or", "all", "and" ] }, "values": { "items": { "oneOf": [ { "$ref": "#/$defs/conditions/clause/user" } ] }, "minItems": 1, "title": "The conditions to use", "type": "array" } }, "required": [ "$type", "values" ], "title": "Conditions for any entry" } }, "denyEnforcement": { "additionalProperties": false, "properties": { "$type": { "enum": [ "deny" ] }, "__comments": { "type": "string" }, "options": { "items": { "enum": [ "disable_audit_deny" ] }, "title": "Options to control the behavior of block events", "type": "array", "uniqueItems": true }, "tag": { "examples": [ "42", "98765432100" ], "format": "uint64", "pattern": "^[0-9]+$", "title": "Custom tag to propogate to portal", "type": "string" } }, "required": [ "$type" ], "title": "Access should be denied" }, "deviceGroup": { "additionalProperties": false, "examples": [ { "$type": "device", "id": "3f082cd3-f701-4c21-9a6a-ed115c28e217", "name": "All Apple Devices", "query": { "$type": "all", "clauses": [ { "$type": "primaryId", "value": "apple_devices" } ] } } ], "properties": { "$type": { "enum": [ "device" ] }, "__comments": { "type": "string" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID representing a unique ID for this device group." }, "name": { "examples": [ "All Apple Devices", "Dev Devices" ], "title": "A friendly name for the group", "type": "string" }, "query": { "$ref": "#/$defs/groups/device/query" } }, "required": [ "$type", "id", "name", "query" ], "title": "Identifies a specific group of devices", "type": "object" }, "enforcement": { "oneOf": [ { "$ref": "#/$defs/denyEnforcement" }, { "$ref": "#/$defs/allowEnforcement" }, { "$ref": "#/$defs/auditDenyEnforcement" }, { "$ref": "#/$defs/auditAllowEnforcement" } ] }, "fileGroup": { "additionalProperties": false, "examples": [ { "$type": "file", "id": "3f082cd3-f701-4c21-9a6a-ed115c28e217", "name": "Executable Types", "query": { "$type": "any", "clauses": [ { "$type": "fileType", "value": ".exe" }, { "$type": "fileType", "value": ".bat" }, { "$type": "fileType", "value": ".ps1" } ] } } ], "properties": { "$type": { "enum": [ "file" ] }, "__comments": { "type": "string" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID representing a unique ID for this file group." }, "name": { "examples": [ "Executable Types", "Text Types" ], "title": "A friendly name for the group", "type": "string" }, "query": { "$ref": "#/$defs/groups/file/query" } }, "required": [ "$type", "id", "name", "query" ], "title": "Identifies a specific group of file types", "type": "object" }, "genericEntry": { "additionalProperties": false, "examples": [ { "$type": "generic", "access": [ "generic_read", "generic_write", "generic_execute" ], "enforcement": { "$type": "deny" }, "id": "34aec8e5-e2fa-4d1e-8788-2b1284226653" } ], "properties": { "$type": { "enum": [ "generic" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "generic_read", "generic_write", "generic_execute" ], "examples": [ "generic_read" ], "title": "Generic access types" }, "minItems": 1, "title": "The access kind to control. Will be translated into device specific access kinds.", "type": "array", "uniqueItems": true }, "conditions": { "$ref": "#/$defs/conditions/standard" }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry to generically control actions" }, "groups": { "device": { "binaryQuery": { "additionalProperties": false, "examples": [ { "$type": "all", "clauses": [ { "$type": "primaryId", "value": "apple_devices" } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "1234" }, { "$type": "productId", "value": "4321" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4321" }, { "$type": "productId", "value": "1234" } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "2222" }, { "$type": "productId", "value": "3333" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4444" } ] } ] } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "12345" }, { "$type": "productId", "value": "AZ" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" } ] } ], "properties": { "$type": { "enum": [ "any", "or", "all", "and" ], "examples": [ "all", "any" ], "title": "Describes how this query combines clauses" }, "__comments": { "type": "string" }, "clauses": { "items": { "oneOf": [ { "$ref": "#/$defs/clauses/primaryId" }, { "$ref": "#/$defs/clauses/vendorId" }, { "$ref": "#/$defs/clauses/productId" }, { "$ref": "#/$defs/clauses/serialNumber" }, { "$ref": "#/$defs/clauses/groupId" }, { "$ref": "#/$defs/clauses/encryption" }, { "$ref": "#/$defs/groups/device/query" } ], "title": "An individual clause to match against a device", "type": "object" }, "minItems": 1, "title": "Clauses to evaluate", "type": "array" } }, "required": [ "$type", "clauses" ], "title": "A query which describes the devices to include in this group", "type": "object" }, "query": { "oneOf": [ { "$ref": "#/$defs/groups/device/binaryQuery" }, { "$ref": "#/$defs/groups/device/unaryQuery" } ] }, "unaryQuery": { "additionalProperties": false, "examples": [ { "$type": "not", "query": { "$type": "and", "clauses": [ { "$type": "primaryId", "value": "apple_devices" }, { "$type": "primaryId", "value": "other_devices" } ] } } ], "properties": { "$type": { "enum": [ "not" ], "examples": [ "not" ], "title": "Negates the result of the contained query" }, "__comments": { "type": "string" }, "query": { "$ref": "#/$defs/groups/device/query" } }, "required": [ "$type", "query" ], "title": "A query which describes the devices to include in this group", "type": "object" } }, "file": { "binaryQuery": { "additionalProperties": false, "examples": [ { "$type": "all", "clauses": [ { "$type": "fileType", "value": ".exe" } ] }, { "$type": "any", "clauses": [ { "$type": "fileType", "value": ".exe" }, { "$type": "fileType", "value": ".txt" }, { "$type": "any", "clauses": [ { "$type": "fileType", "value": ".doc" }, { "$type": "fileType", "value": ".docx" }, { "$type": "all", "clauses": [ { "$type": "fileType", "value": ".ps1" } ] } ] } ] } ], "properties": { "$type": { "enum": [ "any", "or", "all", "and" ], "examples": [ "all", "any" ], "title": "Describes how this query combines clauses" }, "__comments": { "type": "string" }, "clauses": { "items": { "oneOf": [ { "$ref": "#/$defs/clauses/fileType" } ], "title": "An individual clause to match against a file", "type": "object" }, "minItems": 1, "title": "Clauses to evaluate", "type": "array" } }, "required": [ "$type", "clauses" ], "title": "A query which describes the files to include in this group", "type": "object" }, "query": { "oneOf": [ { "$ref": "#/$defs/groups/file/binaryQuery" }, { "$ref": "#/$defs/groups/file/unaryQuery" } ] }, "unaryQuery": { "additionalProperties": false, "examples": [ { "$type": "not", "query": { "$type": "any", "clauses": [ { "$type": "fileType", "value": ".txt" }, { "$type": "fileType", "value": ".pdf" } ] } } ], "properties": { "$type": { "enum": [ "not" ], "examples": [ "not" ], "title": "Describes how this query combines clauses" }, "__comments": { "type": "string" }, "query": { "$ref": "#/$defs/groups/file/query" } }, "required": [ "$type", "query" ], "title": "A query which describes the file types to include in this group", "type": "object" } }, "user": { "binaryQuery": { "additionalProperties": false, "examples": [ { "$type": "or", "clauses": [ { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141850" } ] }, { "$type": "or", "clauses": [ { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141850" }, { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141851" }, { "$type": "and", "clauses": [ { "$type": "aadObjectId", "value": "FE09D726-F582-479E-A737-AAAEE1248640" }, { "$type": "aadObjectId", "value": "FE09D726-F582-479E-A737-AAAEE1248641" } ] } ] } ], "properties": { "$type": { "enum": [ "any", "or", "all", "and" ], "examples": [ "all", "any" ], "title": "Describes how this query combines clauses" }, "__comments": { "type": "string" }, "clauses": { "items": { "oneOf": [ { "$ref": "#/$defs/clauses/securityIdentifier" }, { "$ref": "#/$defs/clauses/aadObjectId" } ], "title": "An individual clause to match against a user", "type": "object" }, "minItems": 1, "title": "Clauses to evaluate", "type": "array" } }, "required": [ "$type", "clauses" ], "title": "A query which describes the users to include in this group", "type": "object" }, "query": { "oneOf": [ { "$ref": "#/$defs/groups/user/binaryQuery" }, { "$ref": "#/$defs/groups/user/unaryQuery" } ] }, "unaryQuery": { "additionalProperties": false, "examples": [ { "$type": "not", "query": { "$type": "or", "clauses": [ { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141850" } ] } } ], "properties": { "$type": { "enum": [ "not" ], "examples": [ "not" ], "title": "Describes how this query combines clauses" }, "__comments": { "type": "string" }, "query": { "$ref": "#/$defs/groups/user/query" } }, "required": [ "$type", "query" ], "title": "A query which describes the users to include in this group", "type": "object" } } }, "portableDeviceEntry": { "additionalProperties": false, "properties": { "$type": { "enum": [ "portableDevice" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "download_files_from_device", "send_files_to_device", "download_photos_from_device", "debug" ], "examples": [ "send_files_to_device" ], "title": "Portable Device specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "conditions": { "$ref": "#/$defs/conditions/standard" }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry for a portable device" }, "removableMediaEntry": { "additionalProperties": false, "properties": { "$type": { "enum": [ "removableMedia" ] }, "__comments": { "type": "string" }, "access": { "items": { "enum": [ "read", "write", "execute" ], "examples": [ "read" ], "title": "Removable Media specific access types" }, "minItems": 1, "title": "The access kind to control", "type": "array", "uniqueItems": true }, "conditions": { "$ref": "#/$defs/conditions/removableMedia" }, "enforcement": { "$ref": "#/$defs/enforcement" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID of the entry" } }, "required": [ "$type", "enforcement", "access" ], "title": "An entry for a removable media device" }, "sid": { "examples": [ "S-1-12-1-2928708656-1113891680-214612123-1557141850" ], "pattern": "^S-[0-9\\-]*$", "title": "Security Identifier", "type": "string" }, "userGroup": { "additionalProperties": false, "examples": [ { "$type": "user", "id": "3f082cd3-f701-4c21-9a6a-ed115c28e217", "name": "Developers", "query": { "$type": "or", "clauses": [ { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141850" }, { "$type": "securityIdentifier", "value": "S-1-12-1-2928708656-1113891680-214612123-1557141851" } ] } } ], "properties": { "$type": { "enum": [ "user" ] }, "__comments": { "type": "string" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID representing a unique ID for this user group." }, "name": { "examples": [ "Developers", "Marketing" ], "title": "A friendly name for the group", "type": "string" }, "query": { "$ref": "#/$defs/groups/user/query" } }, "required": [ "$type", "id", "name", "query" ], "title": "Identifies a specific group of users", "type": "object" }, "uuid": { "examples": [ "34aec8e5-e2fa-4d1e-8788-2b1284226653" ], "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", "type": "string" } }, "$schema": "https://json-schema.org/draft/2019-09/schema", "additionalProperties": false, "default": {}, "examples": [ { "groups": [ { "$type": "device", "id": "3f082cd3-f701-4c21-9a6a-ed115c28e217", "name": "All Apple Devices", "query": { "$type": "all", "clauses": [ { "$type": "primaryId", "value": "apple_devices" } ] } }, { "$type": "device", "id": "34aec8e5-e2fa-4d1e-8788-2b1284226653", "query": { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "1234" }, { "$type": "productId", "value": "4321" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4321" }, { "$type": "productId", "value": "1234" } ] }, { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "2222" }, { "$type": "productId", "value": "3333" }, { "$type": "all", "clauses": [ { "$type": "vendorId", "value": "4444" } ] } ] } ] } }, { "$type": "device", "id": "03f025f6-ee9d-49b2-b192-fc7a00df6856", "name": "Dev Machines", "query": { "$type": "any", "clauses": [ { "$type": "vendorId", "value": "12345" }, { "$type": "productId", "value": "AZ" }, { "$type": "serialNumber", "value": "ABCDEFGHIJKLMNOP" } ] } } ], "rules": [ { "entries": [ { "$type": "appleDevice", "access": [ "download_files_from_device", "sync_content_to_device", "backup_device", "update_device", "download_photos_from_device" ], "enforcement": { "$type": "allow", "options": [ "disable_audit_deny", "disable_audit_allow" ] } }, { "$type": "generic", "access": [ "generic_read", "generic_write", "generic_execute" ], "enforcement": { "$type": "deny" } } ], "excludeGroups": [ "34aec8e5-e2fa-4d1e-8788-2b1284226653" ], "id": "772cef80-229f-48b4-bd17-a6913009298d", "includeGroups": [ "3f082cd3-f701-4c21-9a6a-ed115c28e217" ], "name": "Test Rule #1" }, { "entries": [ { "$type": "appleDevice", "access": [ "update_device" ], "enforcement": { "$type": "allow" } } ], "id": "bfabe24b-37a6-4bc0-9778-421aeaeece23", "includeGroups": [ "03f025f6-ee9d-49b2-b192-fc7a00df6856", "03f025f6-ee9d-49b2-b192-fc7a00df6857", "3f082cd3-f701-4c21-9a6a-ed115c28e217" ], "name": "Test Rule #2" } ], "settings": { "features": { "appleDevice": { "disable": false }, "bluetoothDevice": { "disable": false }, "portableDevice": { "disable": true }, "removableMedia": { "disable": null } }, "global": { "defaultEnforcement": "deny" }, "ux": { "navigationTarget": "http://www.microsoft.com" } } } ], "properties": { "__comments": { "type": "string" }, "groups": { "items": { "oneOf": [ { "$ref": "#/$defs/deviceGroup" }, { "$ref": "#/$defs/fileGroup" }, { "$ref": "#/$defs/userGroup" } ], "title": "A group", "type": "object" }, "minItems": 1, "title": "Groups to be used within rules", "type": "array" }, "rules": { "items": { "additionalProperties": false, "properties": { "__comments": { "type": "string" }, "entries": { "items": { "oneOf": [ { "$ref": "#/$defs/appleDeviceEntry" }, { "$ref": "#/$defs/removableMediaEntry" }, { "$ref": "#/$defs/bluetoothDeviceEntry" }, { "$ref": "#/$defs/portableDeviceEntry" }, { "$ref": "#/$defs/genericEntry" } ], "title": "A rule entry", "type": "object" }, "minItems": 1, "title": "The enforcement behavior for this rule. Entries are traversed in order, and the first match dictates the action taken.", "type": "array" }, "excludeGroups": { "items": { "$ref": "#/$defs/uuid", "title": "UUID of a device group" }, "minItems": 0, "title": "List of device groups which override the applicability logic of includeGroups. Membership in any of these groups (logical OR) will disable the rule for a device.", "type": "array" }, "id": { "$ref": "#/$defs/uuid", "title": "UUID to uniquely identify this rule." }, "includeGroups": { "items": { "$ref": "#/$defs/uuid", "title": "UUID of a device group" }, "minItems": 0, "title": "List of all the device groups that a device must be a member of (logical AND) for this rule to be applicable.", "type": "array" }, "name": { "examples": [ "Removable Media: Read Only", "Test Rule #1" ], "title": "Friendly name for the rule", "type": "string" } }, "required": [ "id", "name", "entries" ], "title": "A device control rule", "type": "object" }, "minItems": 1, "title": "The rules which define the behavior of device control for a group of devices", "type": "array" }, "settings": { "additionalProperties": false, "default": {}, "examples": [ { "features": { "appleDevice": { "disable": false } }, "global": { "defaultEnforcement": "deny" }, "ux": { "navigationTarget": "http://www.microsoft.com" } } ], "properties": { "__comments": { "type": "string" }, "features": { "additionalProperties": false, "default": {}, "examples": [ { "appleDevice": { "disable": false } } ], "properties": { "__comments": { "type": "string" }, "appleDevice": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ false ], "title": "Disable the Apple Devices feature?", "type": "boolean" }, "excludedPaths": { "items": { "title": "Path to exclude", "type": "string" }, "minItems": 1, "title": "Paths to allow restricted applications to access.", "type": "array" }, "unallowedApplications": { "items": { "$ref": "#/$defs/applicationIdentifier", "title": "Application to restrict", "type": "object" }, "minItems": 1, "title": "Additional applications to restrict when a restricted apple device is attached to the system.", "type": "array" } }, "title": "Settings for Apple Devices", "type": "object" }, "bluetoothDevice": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ true ], "title": "Disable the Bluetooth Devices feature?", "type": "boolean" }, "excludedPaths": { "items": { "title": "Path to exclude", "type": "string" }, "minItems": 1, "title": "Paths to allow restricted applications to access.", "type": "array" }, "unallowedApplications": { "items": { "$ref": "#/$defs/applicationIdentifier", "title": "Application to restrict", "type": "object" }, "minItems": 1, "title": "Additional applications to restrict when a restricted bluetooth device is attached to the system.", "type": "array" } }, "title": "Settings for Bluetooth Devices", "type": "object" }, "portableDevice": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ true ], "title": "Disable the Portable Devices feature?", "type": "boolean" }, "excludedPaths": { "items": { "title": "Path to exclude", "type": "string" }, "minItems": 1, "title": "Paths to allow restricted applications to access.", "type": "array" }, "unallowedApplications": { "items": { "$ref": "#/$defs/applicationIdentifier", "title": "Application to restrict", "type": "object" }, "minItems": 1, "title": "Additional applications to restrict when a restricted portable device is attached to the system.", "type": "array" } }, "title": "Settings for Portable Devices", "type": "object" }, "removableMedia": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "disable": { "default": true, "examples": [ false ], "title": "Disable the Removable Media feature?", "type": "boolean" } }, "title": "Settings for Removable Media Devices", "type": "object" } }, "title": "Feature specific settings", "type": "object" }, "global": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "defaultEnforcement": { "default": "allow", "enum": [ "allow", "deny" ], "examples": [ "deny" ], "title": "Default Enforcement if no rules match an action." }, "protectedLocations": { "items": { "title": "Path to protect from restricted applications.", "type": "string" }, "minItems": 1, "title": "Additional paths that should be protected from restricted applications.", "type": "array" } }, "title": "Global Settings", "type": "object" }, "ux": { "additionalProperties": false, "default": {}, "properties": { "__comments": { "type": "string" }, "navigationTarget": { "examples": [ "http://www.microsoft.com" ], "title": "URI to direct users to if the UX notification is clicked.", "type": "string" } }, "title": "UX settings", "type": "object" } }, "title": "Settings to control Device Control", "type": "object" } }, "required": [ "groups", "rules", "settings" ], "title": "Device Control for macOS policy file", "type": "object" }
MIT
en
microsoft/PlanetaryComputerDataCatalog
c33a60db67b32316dc55d582b02efc9181e0c94e
2021-06-25T17:42:22
mockstac/data/sentinel-2-l2a/queryables.json
35
2024-05-27T23:41:06.648474Z
{ "$id": "https://example.org/queryables", "$schema": "https://json-schema.org/draft/2019-09/schema", "description": "Queryable properties for the mock STAC API Item Search filter.", "properties": { "eo:cloud_cover": { "$ref": "https://stac-extensions.github.io/eo/v1.0.0/schema.json#/definitions/fields/properties/eo:cloud_cover", "description": "Cloud Cover" }, "s2:snow_ice_percentage": { "description": "Snow/Ice Cover", "max": 100, "min": 0, "type": "number" } }, "title": "Queryables for mock PC Sentinel-2-l2a STAC API", "type": "object" }
MIT
en
microsoft/PlanetaryComputerDataCatalog
0238e98371a315d79b1c0cfba056231706a61f30
2021-07-26T12:52:33
mockstac/data/sentinel-2-l2a/queryables.json
35
2024-05-27T23:41:06.648474Z
{ "$id": "https://example.org/queryables", "$schema": "https://json-schema.org/draft/2019-09/schema", "description": "Queryable properties for the mock STAC API Item Search filter.", "properties": { "eo:cloud_cover": { "$ref": "https://stac-extensions.github.io/eo/v1.0.0/schema.json#/definitions/fields/properties/eo:cloud_cover" }, "s2:snow_ice_percentage": { "max": 100, "min": 0, "title": "Snow/Ice Cover", "type": "number" }, "sat:orbit_state": { "$ref": "https://stac-extensions.github.io/sat/v1.0.0/schema.json#/definitions/fields/properties/sat:orbit_state" } }, "title": "Queryables for mock PC Sentinel-2-l2a STAC API", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
41265bfa8ea807b4802f91c8a7fd48a397e4907c
2022-03-18T20:55:04
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "additionalProperties": false, "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this Link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "IStatusColoringVisual": { "additionalProperties": false, "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "type": { "const": "StatusColoring" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "statusValueExpression", "valueRanges", "objectIDs" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "id": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "id", "color", "min", "max" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
2de6f4d4184c8dc442f916f65780725c89f0b284
2022-06-24T18:06:40
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
a901368b0eabdf9c74dc99536a8ce34aaa91a8d8
2022-11-11T00:06:26
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IADXTimeSeriesConnection": { "additionalProperties": false, "description": "Azure Data Explorer connection information for time series data", "properties": { "adxClusterUrl": { "type": "string" }, "adxDatabaseName": { "type": "string" }, "adxTableName": { "type": "string" } }, "required": [ "adxClusterUrl", "adxDatabaseName", "adxTableName" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "unit": { "type": "string" } }, "required": [ "id", "expression" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpanInMillis": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpanInMillis", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connection": { "$ref": "#/$defs/ITimeSeriesConnection", "description": "Database connection information of timeseries data" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connection", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRangeType": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITimeSeriesConnection": { "anyOf": [ { "$ref": "#/$defs/IADXTimeSeriesConnection" } ] }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true]. String values are parsed as regular arrays [string1, string2, string3]", "items": { "$ref": "#/$defs/ValueRangeValueType" }, "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" } ] }, "ValueRangeValueType": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "boolean" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
9bd4bdd2d6263547078af70e56b15951a88fa704
2022-10-13T20:25:07
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "unit": { "type": "string" } }, "required": [ "id", "expression" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpan": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpan", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connectionString": { "description": "Timeseries database connection string in key1=value1;key2=value2;key3=value3 format that is used for the connection of a data history widget", "type": "string" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connectionString", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
5c96d9ee06e40d69565c4500dba5c884f324d516
2022-10-18T22:04:45
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "unit": { "type": "string" } }, "required": [ "id", "expression" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpan": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpan", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connectionString": { "description": "Timeseries database connection string in key1=value1;key2=value2;key3=value3 format that is used for the connection of a data history widget", "type": "string" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connectionString", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRangeType": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
d30eb227da9626bbbafc1b116b6c051b902c75dc
2022-03-11T00:18:04
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "additionalProperties": false, "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" }, "units": { "type": "string" } }, "type": "object" } }, "required": [ "type", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Link" }, "widgetConfiguration": { "description": "Widget configuration specifies widget specific properties that are used for rendering this Link", "properties": { "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "type": "object" } }, "required": [ "type", "widgetConfiguration" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "IStatusColoringVisual": { "additionalProperties": false, "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "statusValueRanges": { "items": { "$ref": "#/$defs/IStatusValueRange" }, "type": "array" }, "type": { "const": "StatusColoring" } }, "required": [ "type", "statusValueExpression", "statusValueRanges", "objectIDs" ], "type": "object" }, "IStatusValueRange": { "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "color", "min", "max" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
ce06d40d18c4950a9e2db42f1a28220206ec36d0
2022-10-10T21:24:19
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
848964d0eab3686bb982bc7435e3112fbc2fd613
2023-02-28T18:38:02
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IADXTimeSeriesConnection": { "additionalProperties": false, "description": "Azure Data Explorer connection information for time series data", "properties": { "adxClusterUrl": { "type": "string" }, "adxDatabaseName": { "type": "string" }, "adxTableName": { "type": "string" } }, "required": [ "adxClusterUrl", "adxDatabaseName", "adxTableName" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "propertyType": { "$ref": "#/$defs/IDTDLPropertyType" }, "unit": { "type": "string" } }, "required": [ "id", "expression", "propertyType" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpanInMillis": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpanInMillis", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connection": { "$ref": "#/$defs/ITimeSeriesConnection", "description": "Database connection information of timeseries data" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connection", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRangeType": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IPowerBIWidget": { "additionalProperties": false, "description": "A widget to connect to Power BI and display a specified visualization", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "type": { "const": "PowerBI" }, "widgetConfiguration": { "$ref": "#/$defs/IPowerBIWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IPowerBIWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration for required Power BI properties used to render visualization", "properties": { "dataFilterExpression": { "description": "Template string which evalues to data filter", "type": "string" }, "displayName": { "type": "string" }, "embedUrl": { "description": "The URL of the report that contains the visual that you're embedding. This URL becomes the source of the HTML iframe element that contains the embedded visual. Specifically, the API assigns the URL to the src attribute of the iframe. Similar to \"https://app.powerbi.com/reportEmbed?reportId=<report ID>&groupId=<group ID>\" or \"https://app.powerbi.com/groups/<group ID>/reports/<report ID>\"", "type": "string" }, "pageName": { "description": "The name of the page that contains the visual that you're embedding", "type": "string" }, "type": { "description": "Supported types: report, dashboard, tile, visual", "enum": [ "Tile", "Visual" ], "type": "string" }, "visualName": { "type": "string" } }, "required": [ "type", "label", "reportId" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITimeSeriesConnection": { "anyOf": [ { "$ref": "#/$defs/IADXTimeSeriesConnection" } ] }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true]. String values are parsed as regular arrays [string1, string2, string3]", "items": { "$ref": "#/$defs/ValueRangeValueType" }, "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" }, { "$ref": "#/$defs/IPowerBIWidget" } ] }, "ValueRangeValueType": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "boolean" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
fdb815185990e51582a027939548fce54a503a33
2022-03-16T20:37:58
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "additionalProperties": false, "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this Link", "properties": { "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "IStatusColoringVisual": { "additionalProperties": false, "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "type": { "const": "StatusColoring" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "statusValueExpression", "valueRanges", "objectIDs" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "id": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "id", "color", "min", "max" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
2add350d4d4c8d5183cd54fd73ff24a091c8e227
2022-03-03T00:14:10
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "extensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "groupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "numericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "objectIDs": { "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/extensionProperties" } }, "required": [ "expression" ], "type": "object" }, "valueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "anyOf": [ { "description": "ElementDataSources get their object from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string", "uniqueItems": true }, "type": "array" }, "extensionProperties": { "$ref": "#/$defs/extensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, { "description": "Free form datasource type", "type": "object" } ] }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string", "uniqueItems": true }, "type": "array" }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "anyOf": [ { "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/objectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "anyOf": [ { "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/extensionProperties" }, "groupID": { "$ref": "#/$defs/groupID" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/valueExpression" }, "widgetConfiguration": { "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "max": { "$ref": "#/$defs/numericOrInfinityType" }, "min": { "$ref": "#/$defs/numericOrInfinityType" }, "units": { "type": "string" } }, "type": "object" } }, "required": [ "type", "valueExpression", "widgetConfiguration" ], "type": "object" }, { "description": "A link widget which uses a string template to create a parametrized link", "properties": { "groupID": { "$ref": "#/$defs/groupID" }, "type": { "const": "Link" }, "widgetConfiguration": { "description": "Widget configuration specifies widget specific properties that are used for rendering this Link", "properties": { "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "type": "object" } }, "required": [ "type", "widgetConfiguration" ], "type": "object" } ] }, "type": "array" } }, "required": [ "type", "title", "widgets", "widgetGroups", "objectIDs" ], "type": "object" }, { "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "objectIDs": { "$ref": "#/$defs/objectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "statusValueRanges": { "items": { "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "max": { "$ref": "#/$defs/numericOrInfinityType" }, "min": { "$ref": "#/$defs/numericOrInfinityType" } }, "required": [ "color", "min", "max" ], "type": "object" }, "type": "array" }, "type": { "const": "StatusColoring" } }, "required": [ "type", "statusValueExpression", "statusValueRanges", "objectIDs" ], "type": "object" }, { "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/objectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" } ] }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "type": "array" }, "layers": { "items": { "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/extensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "type": "array" }, "scenes": { "items": { "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/extensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string", "uniqueItems": true }, "type": "array" }, "displayName": { "type": "string" }, "elements": { "items": { "anyOf": [ { "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/extensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string", "uniqueItems": true }, "type": "array" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "type": "object" }, { "description": "Free form element type", "type": "object" } ] }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "array" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "3D scenes configuration - JSON schema", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
5356a2b3ff2ce6eec02dc6e0f11332a26297fb44
2022-05-11T02:16:17
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "additionalProperties": false, "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "IStatusColoringVisual": { "additionalProperties": false, "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "type": { "const": "StatusColoring" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "statusValueExpression", "valueRanges", "objectIDs" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "id": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "id", "color", "min", "max" ], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
d3557b8f8b9f92d6df843df240cf9217847e994b
2022-05-12T23:34:57
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "type": "object" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
bd53852ecc328fa9dcda840801351a3806abe644
2022-03-09T19:23:03
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "ICustomProperty": { "additionalProperties": false, "description": "Free form property", "properties": { "customProperties": { "description": "Bag for any custom properties", "type": "object" } }, "required": [ "customProperties" ], "type": "object" }, "IElementTwinToObjectMappingDataSource": { "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string", "uniqueItems": true }, "type": "array" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "anyOf": [ { "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" }, "units": { "type": "string" } }, "type": "object" } }, "required": [ "type", "valueExpression", "widgetConfiguration" ], "type": "object" }, { "description": "A link widget which uses a string template to create a parametrized link", "properties": { "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Link" }, "widgetConfiguration": { "description": "Widget configuration specifies widget specific properties that are used for rendering this Link", "properties": { "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "type": "object" } }, "required": [ "type", "widgetConfiguration" ], "type": "object" } ] }, "type": "array" } }, "required": [ "type", "title", "widgets", "widgetGroups", "objectIDs" ], "type": "object" }, "IStatusColoringVisual": { "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "statusValueRanges": { "items": { "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "color", "min", "max" ], "type": "object" }, "type": "array" }, "type": { "const": "StatusColoring" } }, "required": [ "type", "statusValueExpression", "statusValueRanges", "objectIDs" ], "type": "object" }, "ITwinToObjectMapping": { "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string", "uniqueItems": true }, "type": "array" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string", "uniqueItems": true }, "type": "array" }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "type": "array" }, "layers": { "items": { "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "type": "array" }, "scenes": { "items": { "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string", "uniqueItems": true }, "type": "array" }, "displayName": { "type": "string" }, "elements": { "items": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "type": "array" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
4a69c95b8b1c1df7b037bf99e2e218b8c326f504
2022-10-26T17:33:40
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IADXTimeSeriesConnection": { "additionalProperties": false, "description": "Azure Data Explorer connection information for time series data", "properties": { "adxClusterUrl": { "type": "string" }, "adxDatabaseName": { "type": "string" }, "adxTableName": { "type": "string" } }, "required": [ "adxClusterUrl", "adxDatabaseName", "adxTableName" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "unit": { "type": "string" } }, "required": [ "id", "expression" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpanInMillis": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpanInMillis", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connection": { "$ref": "#/$defs/ITimeSeriesConnection", "description": "Database connection information of timeseries data" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connection", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRangeType": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITimeSeriesConnection": { "anyOf": [ { "$ref": "#/$defs/IADXTimeSeriesConnection" } ] }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
6f8b999b605b36064da38328ed0204cdd3db2db2
2022-05-02T18:18:07
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "additionalProperties": false, "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "IStatusColoringVisual": { "additionalProperties": false, "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "type": { "const": "StatusColoring" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "statusValueExpression", "valueRanges", "objectIDs" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "id": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "id", "color", "min", "max" ], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
acd6965f20e251e68e54ef4e1f33157a958fbf47
2022-10-20T20:05:07
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "unit": { "type": "string" } }, "required": [ "id", "expression" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpanInMillis": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpanInMillis", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connectionString": { "description": "Timeseries database connection string in key1=value1;key2=value2;key3=value3 format that is used for the connection of a data history widget", "type": "string" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connectionString", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRangeType": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
8544d02c54c0997b68f1cc30a21d74787c12b11a
2022-11-14T18:56:42
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IADXTimeSeriesConnection": { "additionalProperties": false, "description": "Azure Data Explorer connection information for time series data", "properties": { "adxClusterUrl": { "type": "string" }, "adxDatabaseName": { "type": "string" }, "adxTableName": { "type": "string" } }, "required": [ "adxClusterUrl", "adxDatabaseName", "adxTableName" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataHistoryAggregationType": { "enum": [ "min", "max", "avg" ], "type": "string" }, "IDataHistoryBasicTimeSeries": { "additionalProperties": false, "description": "A basic timeseries to be rendered in the chart of the data history widget", "properties": { "expression": { "type": "string" }, "id": { "type": "string" }, "label": { "type": "string" }, "propertyType": { "$ref": "#/$defs/IDTDLPropertyType" }, "unit": { "type": "string" } }, "required": [ "id", "expression", "propertyType" ], "type": "object" }, "IDataHistoryChartOptions": { "additionalProperties": false, "description": "Options to be used while rendering chart for data history widget", "properties": { "aggregationType": { "$ref": "#/$defs/IDataHistoryAggregationType" }, "defaultQuickTimeSpanInMillis": { "type": "number" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "yAxisType": { "$ref": "#/$defs/IDataHistoryChartYAxisType" } }, "required": [ "yAxisType", "defaultQuickTimeSpanInMillis", "aggregationType" ], "type": "object" }, "IDataHistoryChartYAxisType": { "enum": [ "shared", "independent" ], "type": "string" }, "IDataHistoryTimeSeries": { "description": "A list of timeseries to render in the chart", "items": { "$ref": "#/$defs/IDataHistoryBasicTimeSeries" }, "type": "array" }, "IDataHistoryWidget": { "additionalProperties": false, "description": "A data history widget which uses twin properties to show timeseries data", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Data history" }, "widgetConfiguration": { "$ref": "#/$defs/IDataHistoryWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IDataHistoryWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this data history", "properties": { "chartOptions": { "$ref": "#/$defs/IDataHistoryChartOptions" }, "connection": { "$ref": "#/$defs/ITimeSeriesConnection", "description": "Database connection information of timeseries data" }, "displayName": { "type": "string" }, "timeSeries": { "$ref": "#/$defs/IDataHistoryTimeSeries" } }, "required": [ "connection", "displayName", "timeSeries", "chartOptions" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "displayName": { "type": "string" }, "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRangeType": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITimeSeriesConnection": { "anyOf": [ { "$ref": "#/$defs/IADXTimeSeriesConnection" } ] }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true]. String values are parsed as regular arrays [string1, string2, string3]", "items": { "$ref": "#/$defs/ValueRangeValueType" }, "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" }, { "$ref": "#/$defs/IDataHistoryWidget" } ] }, "ValueRangeValueType": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "boolean" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
ffec4391717ab2e79bac02d06a95b24fcada35ce
2022-08-09T17:48:55
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the strategy and parameters for the polling of twin data from the twin graph. NOTE: `MinimumPollingFrequency` is required when polling strategy is `Limited`", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" }, "pollingStrategy": { "$ref": "#/$defs/IPollingStrategy" } }, "required": [ "pollingStrategy" ], "type": "object" }, "IPollingStrategy": { "description": "The strategy to use for polling data. Realtime fetches as often as possible given the number of visible twins. Limited will refresh at a rate equal to the ceiling of the `Realtime` value and the `MinimumPollingFrequency`", "enum": [ "Realtime", "Limited" ], "type": "string" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
c6c26c4d6c764d27310859ad3087b700c1d2cb31
2022-08-15T19:52:40
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDTDLPropertyType": { "enum": [ "boolean", "date", "dateTime", "double", "duration", "enum", "float", "integer", "long", "string", "time" ], "type": "string" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExpressionRangeType": { "enum": [ "NumericRange", "CategoricalValues" ], "type": "string" }, "IExpressionRangeVisual": { "additionalProperties": false, "description": "An expression range visual maps an expression result to a visual", "properties": { "expressionType": { "$ref": "#/$defs/IExpressionRangeType" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "type": { "const": "ExpressionRangeVisual" }, "valueExpression": { "description": "Expression to evaluate", "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "valueExpression", "expressionType", "valueRanges", "objectIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "id", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "label", "valueRanges" ], "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this link", "properties": { "label": { "type": "string" }, "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "required": [ "label", "linkExpression" ], "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPollingConfiguration": { "additionalProperties": false, "description": "Configures the parameters for the polling of twin data from the twin graph.", "properties": { "minimumPollingFrequency": { "description": "The minimum time in milliseconds that data should be refreshed. NOTE: it may take longer than this to fetch the data so this is a floor value intended to limit the frequency when the consumer knows the data is not updated more often than a particular frequency.", "type": "number" } }, "required": [ "minimumPollingFrequency" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "pollingConfiguration": { "$ref": "#/$defs/IPollingConfiguration" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "primaryTwinID": { "description": "The twin referenced by this element", "type": "string" }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary primaryTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "primaryTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Range of values for which a visual indication is triggered", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "values": { "description": "min/max values are parsed as a two element array [min, max]. Boolean values are parsed as a single element array [true].", "type": "array" }, "visual": { "$ref": "#/$defs/IValueRangeVisual" } }, "required": [ "id", "values", "visual" ], "type": "object" }, "IValueRangeVisual": { "additionalProperties": false, "description": "Visual data to apply when values are in range", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "type": "string" } }, "required": [], "type": "object" }, "IValueWidget": { "additionalProperties": false, "description": "A value widget which uses display name and value", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "id": { "type": "string" }, "type": { "const": "Value" }, "widgetConfiguration": { "$ref": "#/$defs/IValueWidgetConfiguration" } }, "required": [ "type", "id", "widgetConfiguration" ], "type": "object" }, "IValueWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this value", "properties": { "displayName": { "type": "string" }, "type": { "$ref": "#/$defs/IDTDLPropertyType" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" } }, "required": [ "displayName", "valueExpression", "type" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IExpressionRangeVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" }, { "$ref": "#/$defs/IValueWidget" } ] } }, "$id": "https://raw.githubusercontent.com/microsoft/iot-cardboard-js/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/iot-cardboard-js
384c24256dafba03220806aff1f9e7e4045c6c13
2022-03-17T19:33:39
schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json
80
2024-05-28T00:58:30.948027Z
{ "$defs": { "IAlertVisual": { "additionalProperties": false, "description": "Alert visual are used to show specific iconography when a boolean expression is true", "properties": { "color": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "iconName": { "type": "string" }, "labelExpression": { "description": "Expression which evalues to a string value", "type": "string" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "triggerExpression": { "description": "Expression which evaluates to a boolean value", "type": "string" }, "type": { "const": "Alert" } }, "required": [ "type", "triggerExpression", "labelExpression", "iconName", "color", "objectIDs" ], "type": "object" }, "IAsset": { "additionalProperties": false, "description": "A 3D asset used to create the scene", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "IBehavior": { "additionalProperties": false, "description": "A behavior applies visual or interactive representations of twin state to objects in the scene", "properties": { "datasources": { "description": "Data sources return an array of objects. Each object is expected to have the same schema. These objects can then be mapped over in visuals.", "items": { "$ref": "#/$defs/IDataSource" }, "type": "array" }, "displayName": { "type": "string" }, "id": { "type": "string" }, "twinAliases": { "items": { "description": "Twin aliases present on this behavior", "type": "string" }, "type": "array", "uniqueItems": true }, "visuals": { "description": "Visuals take a datasource, and modify objects in the scene based on expressions. They allow you to color objects based on their state, float badges under alert conditions and configure popovers that trigger with user interaction", "items": { "$ref": "#/$defs/IVisual" }, "type": "array" } }, "required": [ "id", "displayName", "datasources", "visuals" ], "type": "object" }, "ICustomProperty": { "description": "Free form property", "properties": { "type": { "const": "CustomProperty" } }, "required": [ "type" ], "type": "object" }, "IDataSource": { "anyOf": [ { "$ref": "#/$defs/IElementTwinToObjectMappingDataSource" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElement": { "anyOf": [ { "$ref": "#/$defs/ITwinToObjectMapping" }, { "$ref": "#/$defs/ICustomProperty" } ] }, "IElementTwinToObjectMappingDataSource": { "additionalProperties": false, "description": "These datasources get their objects from the elements defined in a scene", "properties": { "elementIDs": { "items": { "description": "An element ID contained in this data source", "type": "string" }, "type": "array", "uniqueItems": true }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "type": { "const": "ElementTwinToObjectMappingDataSource" } }, "required": [ "type", "elementIDs" ], "type": "object" }, "IExtensionProperties": { "description": "Optional bag of non-schematized extension properties", "type": "object" }, "IGaugeWidget": { "additionalProperties": false, "description": "A gauge widget", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Gauge" }, "valueExpression": { "$ref": "#/$defs/IValueExpression" }, "widgetConfiguration": { "$ref": "#/$defs/IGaugeWidgetConfiguration" } }, "required": [ "type", "valueExpression", "widgetConfiguration" ], "type": "object" }, "IGaugeWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this gauge", "properties": { "label": { "type": "string" }, "units": { "type": "string" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "type": "object" }, "IGroupID": { "description": "Widget group to which a widget belongs", "type": "string" }, "ILayer": { "additionalProperties": false, "description": "Layers are used to group behavior visibility", "properties": { "behaviorIDs": { "items": { "type": "string" }, "type": "array" }, "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" } }, "required": [ "id", "displayName", "behaviorIDs" ], "type": "object" }, "ILinkWidget": { "additionalProperties": false, "description": "A link widget which uses a string template to create a parametrized link", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "groupID": { "$ref": "#/$defs/IGroupID" }, "type": { "const": "Link" }, "widgetConfiguration": { "$ref": "#/$defs/ILinkWidgetConfiguration" } }, "required": [ "type", "widgetConfiguration" ], "type": "object" }, "ILinkWidgetConfiguration": { "additionalProperties": false, "description": "Widget configuration specifies widget specific properties that are used for rendering this Link", "properties": { "linkExpression": { "description": "Template string which evalues to http link", "type": "string" } }, "type": "object" }, "INumericOrInfinityType": { "anyOf": [ { "type": "number" }, { "const": "Infinity" }, { "const": "-Infinity" } ] }, "IObjectIDs": { "additionalProperties": false, "description": "objectIDs specify the objects in the scene that a visual pertains to", "properties": { "expression": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" } }, "required": [ "expression" ], "type": "object" }, "IPopoverVisual": { "additionalProperties": false, "description": "A popover displays information about a datasource when you click on any of the associated objectIDs", "properties": { "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "title": { "type": "string" }, "type": { "const": "Popover" }, "widgetGroups": { "items": { "additionalProperties": false, "description": "Defines a widget group, referenced by ID in widgets", "properties": { "id": { "type": "string" }, "orientation": { "type": "string" }, "title": { "type": "string" } }, "required": [ "id" ], "type": "object" }, "type": "array" }, "widgets": { "description": "Widgets are visuals within a popover. Widgets can be grouped via widgetGroups property.", "items": { "$ref": "#/$defs/IWidget" }, "type": "array" } }, "required": [ "type", "title", "widgets", "objectIDs" ], "type": "object" }, "IScene": { "additionalProperties": false, "description": "A scene is a single view that can be rendered from 3D assets", "properties": { "assets": { "items": { "$ref": "#/$defs/IAsset" }, "type": "array" }, "behaviorIDs": { "items": { "description": "A reference to a behavior present in this scene", "type": "string" }, "type": "array", "uniqueItems": true }, "description": { "type": "string" }, "displayName": { "type": "string" }, "elements": { "items": { "$ref": "#/$defs/IElement" }, "type": "array" }, "id": { "type": "string" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "displayName", "elements", "behaviorIDs", "assets" ], "type": "object" }, "IStatusColoringVisual": { "additionalProperties": false, "description": "a StatusColoring visual is used for mapping an expression result to a color", "properties": { "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "objectIDs": { "$ref": "#/$defs/IObjectIDs" }, "statusValueExpression": { "description": "Expression which evaluates to numeric value", "type": "string" }, "type": { "const": "StatusColoring" }, "valueRanges": { "items": { "$ref": "#/$defs/IValueRange" }, "type": "array" } }, "required": [ "type", "statusValueExpression", "valueRanges", "objectIDs" ], "type": "object" }, "ITwinToObjectMapping": { "additionalProperties": false, "description": "An elements maps twins to objects in the scene", "properties": { "displayName": { "type": "string" }, "extensionProperties": { "$ref": "#/$defs/IExtensionProperties" }, "id": { "type": "string" }, "linkedTwinID": { "description": "The twin referenced by this element", "type": "string" }, "objectIDs": { "description": "Array of of object IDs in the scene", "items": { "description": "An object ID represents 3D meshes in the scene", "type": "string" }, "type": "array", "uniqueItems": true }, "twinAliases": { "additionalProperties": { "type": "string" }, "description": "Links to relevant twins other than the primary linkedTwin. These aliases can be referenced in behavior expressions.", "type": "object" }, "type": { "const": "TwinToObjectMapping" } }, "required": [ "type", "id", "displayName", "linkedTwinID", "objectIDs" ], "type": "object" }, "IValueExpression": { "description": "Expression which evaluates to a numeric value", "type": "string" }, "IValueRange": { "additionalProperties": false, "description": "Numeric range to trigger coloring", "properties": { "color": { "type": "string" }, "id": { "type": "string" }, "max": { "$ref": "#/$defs/INumericOrInfinityType" }, "min": { "$ref": "#/$defs/INumericOrInfinityType" } }, "required": [ "id", "color", "min", "max" ], "type": "object" }, "IVisual": { "anyOf": [ { "$ref": "#/$defs/IPopoverVisual" }, { "$ref": "#/$defs/IStatusColoringVisual" }, { "$ref": "#/$defs/IAlertVisual" } ] }, "IWidget": { "anyOf": [ { "$ref": "#/$defs/IGaugeWidget" }, { "$ref": "#/$defs/ILinkWidget" } ] } }, "$id": "https://github.com/microsoft/iot-cardboard-js/tree/main/schemas/3DScenesConfiguration/v1.0.0/3DScenesConfiguration.schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A vocabulary to annotate and validate the JSON representation of 3D scene configuration data", "properties": { "$schema": { "type": "string" }, "configuration": { "additionalProperties": false, "description": "3D scene configuration data", "properties": { "behaviors": { "items": { "$ref": "#/$defs/IBehavior" }, "type": "array" }, "layers": { "items": { "$ref": "#/$defs/ILayer" }, "type": "array" }, "scenes": { "items": { "$ref": "#/$defs/IScene" }, "type": "array" } }, "required": [ "scenes", "behaviors", "layers" ], "type": "object" } }, "required": [ "$schema", "configuration" ], "title": "I3DScenesConfig", "type": "object" }
MIT
en
microsoft/PowerApps-Tooling
9721cf9f9de1d3d90b691e3d085304017d9b1d3f
2024-05-11T22:40:57
docs/pa.yaml-schema.json
292
2024-05-28T05:53:51.20087Z
{ "$defs": { "ControlDef": { "additionalProperties": false, "patternProperties": { "^[^\\\\]*$": { "additionalProperties": false, "description": "The control name", "properties": { "AccessAppScope": { "type": "string" }, "Children": { "description": "The children of the control", "items": { "$ref": "#/$defs/ControlDef" }, "type": "array" }, "ComponentLibraryUniqueName": { "pattern": "^[0-9A-Za-z_/]*$", "type": "string" }, "ComponentName": { "pattern": "^[0-9A-Za-z_/]*$", "type": "string" }, "Control": { "$ref": "control-type-schema.json#" }, "CustomProperties": { "type": "array" }, "Description": { "type": "string" }, "Layout": { "type": "string" }, "Properties": { "$ref": "control-property-schema.json#" }, "Screens": { "items": { "$ref": "#/$defs/ControlDef" }, "type": "array" }, "Settings": { "type": "object" }, "Style": { "type": "string" }, "Type": { "type": "string" }, "Variant": { "description": "The variant of the control", "type": "string" } }, "required": [ "Control" ], "type": "object" } }, "type": "object" } }, "$id": "https://raw.githubusercontent.com/microsoft/PowerApps-Tooling/master/docs/pa.yaml-schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "Canvas YAML", "oneOf": [ { "$ref": "#/$defs/ControlDef", "description": "A single control" }, { "description": "An array of controls", "items": { "$ref": "#/$defs/ControlDef" }, "type": "array" } ], "title": "Microsoft Power Apps" }
MIT
en
microsoft/PowerApps-Tooling
9721cf9f9de1d3d90b691e3d085304017d9b1d3f
2024-05-11T22:40:57
docs/control-property-schema.json
292
2024-05-28T05:53:51.20087Z
{ "$id": "https://raw.githubusercontent.com/microsoft/PowerApps-Tooling/master/docs/control-type-schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "The properties of the control", "properties": { "Align": { "description": "The location of text in relation to the horizontal center of its control.", "type": "string" }, "AutoHeight": { "description": "Whether a control automatically changes its height to fit the size of its contents, given a fixed width.", "type": "string" }, "BackgroundImage": { "description": "The name of an image file that appears in the background of a screen.", "type": "string" }, "BorderColor": { "description": "The color of a control's border.", "type": "string" }, "BorderStyle": { "description": "Whether a control's border is Solid, Dashed, Dotted, or None.", "type": "string" }, "BorderThickness": { "description": "The thickness of a control's border.", "type": "string" }, "Color": { "description": "The color of text in a control.", "type": "string" }, "Default": { "description": "The initial value of a control before it is changed by the user.", "type": "string" }, "DelayOutput": { "description": "Set to true to delay action during text input.", "type": "string" }, "DisabledBorderColor": { "description": "The color of a control's border if the control's DisplayMode property is set to Disabled.", "type": "string" }, "DisabledColor": { "description": "The color of text in a control if its DisplayMode property is set to Disabled.", "type": "string" }, "DisabledFill": { "description": "The background color of a control if its DisplayMode property is set to Disabled.", "type": "string" }, "DisplayMode": { "description": "Values can be Edit, View, or Disabled. Configures whether the control allows user input (Edit), only displays data (View) or is disabled (Disabled).", "type": "string" }, "DropShadow": { "description": "Adds shadow effects around the control.", "type": "string" }, "Fill": { "description": "The background color of a control.", "type": "string" }, "FocusedBorderColor": { "description": "The color of a control's border when it has focus.", "type": "string" }, "FocusedBorderThickness": { "description": "The thickness of a control's border when it has focus.", "type": "string" }, "Font": { "description": "The name of the family of fonts in which text appears.", "type": "string" }, "FontWeight": { "description": "The weight of the text in a control: Bold, Semibold, Normal, or Lighter.", "type": "string" }, "Height": { "description": "The distance between a control's top and bottom edges.", "type": "string" }, "HoverBorderColor": { "description": "The color of a control's border when the user keeps the mouse pointer on that control.", "type": "string" }, "HoverColor": { "description": "The color of the text in a control when the user keeps the mouse pointer on it.", "type": "string" }, "HoverFill": { "description": "The background color of a control when the user keeps the mouse pointer on it.", "type": "string" }, "Image": { "description": "The name of the image that appears in an image, audio, or microphone control.", "type": "string" }, "ImagePosition": { "description": "The position (Fill, Fit, Stretch, Tile, or Center) of an image in a screen or a control if it isn't the same size as the image.", "type": "string" }, "Italic": { "description": "Whether the text in a control is italic.", "type": "string" }, "Items": { "description": "The source of data that appears in a control such as a gallery, a list, or a chart.", "type": "string" }, "LineHeight": { "description": "The distance between, for example, lines of text or items in a list.", "type": "string" }, "OnChange": { "description": "Actions to perform when the user changes the value of a control (for example, by adjusting a slider).", "type": "string" }, "OnSelect": { "description": "Actions to perform when the user taps or clicks a control.", "type": "string" }, "Padding": { "description": "The distance between the text on an import or export button and the edges of that button.", "type": "string" }, "PaddingBottom": { "description": "The distance between text in a control and the bottom edge of that control.", "type": "string" }, "PaddingLeft": { "description": "The distance between text in a control and the left edge of that control.", "type": "string" }, "PaddingRight": { "description": "The distance between text in a control and the right edge of that control.", "type": "string" }, "PaddingTop": { "description": "The distance between text in a control and the top edge of that control.", "type": "string" }, "PressedBorderColor": { "description": "The color of a control's border when the user taps or clicks that control.", "type": "string" }, "PressedColor": { "description": "The color of text in a control when the user taps or clicks that control.", "type": "string" }, "PressedFill": { "description": "The background color of a control when the user taps or clicks that control.", "type": "string" }, "RadiusBottomLeft": { "description": "The degree to which the bottom-left corner of a control is rounded.", "type": "string" }, "RadiusBottomRight": { "description": "The degree to which the bottom-right corner of a control is rounded.", "type": "string" }, "RadiusTopLeft": { "description": "The degree to which the top-left corner of a control is rounded.", "type": "string" }, "RadiusTopRight": { "description": "The degree to which the top-right corner of a control is rounded.", "type": "string" }, "Reset": { "description": "Whether a control reverts to its default value. Also see the Reset function.", "type": "string" }, "SelectionColor": { "description": "The text color of a selected item or items in a list or the color of the selection tool in a pen control.", "type": "string" }, "SelectionFill": { "description": "The background color of a selected item or items in a list or a selected area of a pen control.", "type": "string" }, "Size": { "description": "The font size of the text that appears on a control.", "type": "string" }, "Strikethrough": { "description": "Whether a line appears through the text that appears on a control.", "type": "string" }, "Text": { "description": "Text that appears on a control or that the user types into a control.", "type": "string" }, "Tooltip": { "description": "Explanatory text that appears when the user hovers over a control.", "type": "string" }, "Underline": { "description": "Whether a line appears under the text that appears on a control.", "type": "string" }, "Value": { "description": "The value of an input control.", "type": "string" }, "VerticalAlign": { "description": "The location of text on a control in relation to the vertical center of that control.", "type": "string" }, "Visible": { "description": "Whether a control appears or is hidden.", "type": "string" }, "Width": { "description": "The distance between a control's left and right edges.", "type": "string" }, "WidthFit ": { "description": "Whether a control automatically grows horizontally to fill any empty space of a container control such as an Edit form control.", "type": "string" }, "X": { "description": "The distance between the left edge of a control and the left edge of its parent container (screen if no parent container)", "type": "string" }, "Y": { "description": "The distance between the top edge of a control and the top edge of the parent container (screen if no parent container)", "type": "string" } }, "title": "Microsoft Power Apps Properties", "type": "object" }
MIT
en
microsoft/PowerApps-Tooling
9721cf9f9de1d3d90b691e3d085304017d9b1d3f
2024-05-11T22:40:57
docs/control-type-schema.json
292
2024-05-28T05:53:51.20087Z
{ "$id": "https://raw.githubusercontent.com/microsoft/PowerApps-Tooling/master/docs/control-type-schema.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "The type of the control", "examples": [ "AddMedia", "Arrow", "Attachments", "Audio", "BarChart", "Barcode", "BarcodeScanner", "Classic/Button", "Camera", "Classic/CheckBox", "Circle", "Classic/ComboBox", "DataCard", "DataGrid", "DataTable", "DataTableColumn", "Classic/DatePicker", "Classic/DropDown", "Export", "FluidGrid", "Form", "FormsPro", "FormViewer", "Gallery", "GalleryTemplate", "Group", "GroupContainer", "Hexagon", "HtmlViewer", "Classic/Icon", "Image", "Import", "PenInput", "Label", "Legend", "LineChart", "ListBox", "Lookup", "Microphone", "Octagon", "PartialCircle", "PDFViewer", "Pentagon", "PieChart", "PowerBI", "Classic/Radio", "Rating", "Rectangle", "RichTextEditor", "Classic/Slider", "Star", "Classic/StreamVideo", "Classic/TextInput", "Timer", "Classic/Toggle", "Triangle", "TypedDataCard", "Video", "FluentV8/Button", "FluentV8/CheckBox", "FluentV8/ComboBox", "FluentV8/DatePicker", "FluentV8/Label", "FluentV8/Radio", "FluentV8/Rating", "FluentV8/Slider", "FluentV8/TextBox", "FluentV8/Toggle", "Badge", "Button", "CheckBox", "ComboBox", "DatePicker", "DropDown", "Header", "InfoButton", "Link", "NumberInput", "Progress", "Radio", "Slider", "Spinner", "StreamVideo", "TabList", "Text", "TextInput", "Toggle", "Table", "Icon", "Avatar", "Breadcrumb", "SpinButton", "Switch", "PowerVirtualAgentsChat", "IoTDeviceManager", "AnnotateInMR", "CopilotAnswer", "Copilot", "Chatbot", "BusinessCardReader", "BarcodeReader", "AddressInput", "ViewIn3D", "ViewShapeInMR", "ViewInMR", "TextRecognizer", "ReceiptProcessor", "ObjectDetector", "Map", "FormProcessor", "MeasureInMR", "EntityForm", "PcfDataField", "SalesNavigatorAccount", "SalesNavigatorLead", "SpeechControl" ], "pattern": "^[0-9A-Za-z_/:#\\.]*$", "title": "Microsoft Power Apps Control Type", "type": "string" }
MIT
en
microsoft/PowerApps-Tooling
f1eb02be78cbc736f56a5a273dae8179cab95402
2024-05-08T19:16:19
docs/pa.yaml-schema.json
292
2024-05-28T05:53:51.20087Z
{ "$defs": { "ControlDef": { "additionalProperties": false, "patternProperties": { "^[^\\\\]*$": { "additionalProperties": false, "properties": { "AccessAppScope": { "type": "string" }, "Children": { "items": { "$ref": "#/$defs/ControlDef" }, "type": "array" }, "ComponentLibraryUniqueName": { "pattern": "^[0-9A-Za-z_/]*$", "type": "string" }, "ComponentName": { "pattern": "^[0-9A-Za-z_/]*$", "type": "string" }, "Control": { "pattern": "^[0-9A-Za-z_/:#\\.]*$", "type": "string" }, "CustomProperties": { "type": "array" }, "Description": { "type": "string" }, "Layout": { "type": "string" }, "Properties": { "type": "object" }, "Screens": { "items": { "$ref": "#/$defs/ControlDef" }, "type": "array" }, "Settings": { "type": "object" }, "Style": { "type": "string" }, "Type": { "type": "string" }, "Variant": { "type": "string" } }, "type": "object" } }, "type": "object" } }, "$id": "https://github.com/microsoft/PowerApps-Language-Tooling/blob/master/docs/pa.yaml-schema.json", "$ref": "#/$defs/ControlDef", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "A schema for describing the structure of a Microsoft Power Apps Yaml.", "title": "Microsoft Power Apps canvas screen schema" }
MIT
en
microsoft/AzureTRE
d6f1a1740d42565a03353fa5014a4f5112a40466
2021-06-03T14:06:43
docs/schemas/resource.json
166
2024-05-29T00:41:41.990629Z
{ "$defs": { "property": { "properties": { "default": { "description": "Property default value.", "type": "string" }, "description": { "description": "Property description.", "type": "string" }, "mutable": { "description": "Is value mutable?", "type": "boolean" }, "propertyType": { "description": "Property type.", "type": "string" }, "required": { "description": "Is property required?", "type": "boolean" }, "title": { "description": "Property title.", "type": "string" }, "value": { "description": "Property value.", "type": "string" } }, "required": [ "title", "description", "propertyType", "required", "mutable", "value" ], "type": "object" } }, "$schema": "https://json-schema.org/draft/2019-09/schema", "additionalProperties": false, "properties": { "ResourceVersion": { "description": "Resource version.", "type": "string" }, "description": { "description": "Resource description.", "maxLength": 120, "type": "string" }, "etag": { "description": "ETag.", "type": "string" }, "id": { "description": "Resource id.", "format": "uuid", "type": "string" }, "isDeleted": { "description": "Is the resource marked for deletion?", "type": "boolean" }, "parentId": { "description": "Parent resource id.", "format": "uuid", "type": "string" }, "properties": { "description": "Resource properties.", "items": { "$ref": "#/$defs/property" }, "type": "array" }, "resourceType": { "description": "Resource type.", "enum": [ "Workspace", "Service" ], "type": "string" }, "specificationVersion": { "description": "Resource specification version.", "type": "string" }, "status": { "description": "Resource status.", "enum": [ "NotDeployed", "Deploying", "Deployed", "Deleting", "Deleted" ], "type": "string" }, "title": { "description": "Resource title.", "maxLength": 120, "type": "string" } }, "required": [ "id", "parentId", "specificationVersion", "resourceVersion", "title", "description", "resourceType", "status", "isDeleted", "properties", "etag" ], "type": "object" }
MIT
en
microsoft/AzureTRE
d6f1a1740d42565a03353fa5014a4f5112a40466
2021-06-03T14:06:43
docs/schemas/operation.json
166
2024-05-29T00:41:41.990629Z
{ "$defs": { "event": { "properties": { "description": { "description": "Event message.", "type": "string" }, "eventType": { "description": "Event type.", "type": "string" }, "from": { "description": "Event originator.", "type": "string" }, "severity": { "description": "Event classification.", "enum": [ "low", "medium", "high", "critical" ], "type": "string" }, "timeStamp": { "description": "Event timestamp.", "type": "string" } }, "required": [ "timeStamp", "message", "from", "severity", "eventType" ], "type": "object" } }, "$schema": "https://json-schema.org/draft/2019-09/schema", "additionalProperties": false, "properties": { "createdAt": { "description": "Operation creation time.", "type": "string" }, "etag": { "description": "ETag.", "type": "string" }, "events": { "description": "Operation event.", "items": { "$ref": "#/$defs/event" }, "type": "array" }, "id": { "description": "Operation id.", "format": "uuid", "type": "string" }, "lastUpdatedAt": { "description": "Operation last update time.", "type": "string" }, "operationType": { "description": "Operation type.", "enum": [ "Create", "Update", "Delete" ], "type": "string" }, "resourceId": { "description": "Resource id.", "format": "uuid", "type": "string" }, "resourceVersion": { "description": "Resource version.", "type": "string" }, "status": { "description": "Operation status.", "enum": [ "Pending", "Processing", "Succeeded", "Failed" ], "type": "string" } }, "required": [ "id", "operationType", "status", "resourceId", "resourceVersion", "createdAt", "lastUpdatedAt", "events", "etag" ], "type": "object" }
MIT
en
microsoft/AzureTRE
d6f1a1740d42565a03353fa5014a4f5112a40466
2021-06-03T14:06:43
docs/schemas/resource-assignment.json
166
2024-05-29T00:41:41.990629Z
{ "$schema": "https://json-schema.org/draft/2019-09/schema", "additionalProperties": false, "properties": { "ResourceId": { "description": "Resource id.", "format": "uuid", "type": "string" }, "etag": { "description": "ETag.", "type": "string" }, "id": { "description": "Assignment id.", "type": "string" }, "permissions": { "items": { "enum": [ "WorkspaceWrite", "WorkspaceRead", "WorkspaceDelete", "WorkspaceCreateService", "WorkspaceUserRead", "WorkspaceUserManage", "ServiceRead", "ServiceWrite", "ServiceDelete" ], "type": "string" }, "type": "array" }, "userId": { "description": "User id.", "format": "uuid", "type": "string" } }, "required": [ "id", "userId", "resourceId", "permissions", "etag" ], "type": "object" }
MIT
en
microsoft/security-devops-common
eeb4ad504786eee61030d1cbf8f93f04b18bff59
2022-08-09T18:49:19
schemata/msdo-rules-schema-0.1.0.json
5
2024-05-27T06:53:33.70884Z
{ "$defs": { "propertyBag": { "additionalProperties": true, "description": "Key/value pairs that provide additional information about the object.", "properties": { "tags": { "default": [], "description": "A set of distinct strings that provide additional information.", "items": { "type": "string" }, "minItems": 0, "type": "array", "uniqueItems": true } }, "type": "object" }, "rule": { "description": "Policy control options to instruct a policy reader to act in a certain way.", "properties": { "properties": { "$ref": "#/definitions/propertyBag", "description": "Key/value pairs that provide additional information about the policy file." } }, "type": "object" }, "ruleCategory": { "description": "A static analysis tool definition to set tool-wide and tool-specific policy controls.", "properties": { "properties": { "$ref": "#/definitions/propertyBag", "description": "Key/value pairs that provide additional information about the policy file." } }, "type": "object" }, "rulePattern": { "description": "Policy controls for a specific static analysis rule.", "properties": { "properties": { "$ref": "#/definitions/propertyBag", "description": "Key/value pairs that provide additional information about the policy file." } }, "type": "object" }, "rulesInfo": { "description": "Policy controls for a specific static analysis rule.", "properties": { "properties": { "$ref": "#/definitions/propertyBag", "description": "Key/value pairs that provide additional information about the policy file." } }, "type": "object" }, "rulesInfoDictionary": { "additionalProperties": { "$ref": "#/$defs/rulesInfo" }, "description": "Policy controls for a specific static analysis rule.", "type": "object" }, "stringDictionary": { "additionalProperties": { "type": "string" }, "description": "Policy controls for a specific static analysis rule.", "type": "object" } }, "$id": "https://github.com/microsoft/security-devops-rules/main/schemata/msdo-rules-schema-0.1.0.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "Microsoft Security DevOps Rules Format (MSDORF) Version 0.1.0 JSON Schema: a standard rules format for overriding rule definitions of static analysis tools.", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", "format": "uri", "type": "string" }, "alternativeAnalyzerNames": { "$ref": "#/$defs/stringDictionary", "description": "Alternative keys to map for analyzers." }, "alternativeRuleIds": { "$ref": "#/$defs/stringDictionary", "description": "Alternative keys to map for rule ids." }, "alternativeRulesetNames": { "$ref": "#/$defs/stringDictionary", "description": "Alternative keys to map for rulesets." }, "analyzers": { "$ref": "#/$defs/rulesInfoDictionary", "description": "A collection of rulesets." }, "properties": { "$ref": "#/definitions/propertyBag", "description": "Key/value pairs that provide additional information about the policy file." }, "rulePatterns": { "$ref": "#/$defs/rulePatternsArray", "description": "A collection of rulesets." }, "rules": { "$ref": "#/$defs/rulesDictionary", "description": "A collection of rulesets." }, "rulesets": { "$ref": "#/$defs/rulesInfoDictionary", "description": "A dictionary of rulesets." }, "version": { "description": "The version of this file or data.", "type": "string" } }, "title": "Microsoft Security DevOps Rules Format (MSDORF) Version 0.1.0 JSON Schema", "type": "object" }
MIT
en
microsoft/security-devops-common
3cedf2450555766d2fed1d6e9c58d601a581938c
2022-08-09T16:54:08
schemata/msdo-rules-schema-0.1.0.json
5
2024-05-27T06:53:33.70884Z
{ "$defs": { "policyControls": { "description": "Policy control options to instruct a policy reader to act in a certain way.", "type": "object" }, "policyRule": { "description": "Policy controls for a specific static analysis rule.", "type": "object" }, "policyTool": { "description": "A static analysis tool definition to set tool-wide and tool-specific policy controls.", "type": "object" }, "propertyBag": { "additionalProperties": true, "description": "Key/value pairs that provide additional information about the object.", "properties": { "tags": { "default": [], "description": "A set of distinct strings that provide additional information.", "items": { "type": "string" }, "minItems": 0, "type": "array", "uniqueItems": true } }, "type": "object" } }, "$id": "https://github.com/microsoft/security-devops-rules/main/schemata/msdo-rules-schema-0.1.0.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "additionalProperties": false, "description": "Microsoft Security DevOps Rules Format (MSDORF) Version 0.1.0 JSON Schema: a standard rules format for overriding rule definitions of static analysis tools.", "properties": { "$schema": { "description": "The URI of the JSON schema corresponding to the version.", "format": "uri", "type": "string" }, "properties": { "$ref": "#/definitions/propertyBag", "description": "Key/value pairs that provide additional information about the policy file." }, "version": { "description": "The version of this file or data.", "type": "string" } }, "title": "Microsoft Security DevOps Rules Format (MSDORF) Version 0.1.0 JSON Schema", "type": "object" }
MIT
en
microsoft/PSDocs
0596d6393b54d91ce14b7a33eff2fdc3bbb5e5a7
2023-07-18T05:27:14
schemas/PSDocs-language.schema.json
136
2024-05-28T02:54:05.219331Z
{ "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "title": "Annotations", "type": "object" }, "name": { "description": "The name of the resource. This must be unique.", "minLength": 3, "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "selector-v1": { "description": "A PSDocs Selector.", "markdownDescription": "A PSDocs Selector. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md)", "properties": { "apiVersion": { "description": "The API Version for the PSDocs resources.", "enum": [ "github.com/microsoft/PSDocs/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSDocs Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "equals": { "oneOf": [ { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "string" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "integer" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "boolean" } ] } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notEquals": { "oneOf": [ { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "string" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "integer" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "boolean" } ] } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#allof)", "title": "AllOf", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#anyof)", "title": "AnyOf", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "properties": { "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] } ] }, "selectorSpec": { "additionalProperties": false, "description": "PSDocs selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "description": "A schema for PSDocs YAML language files.", "oneOf": [ { "$ref": "#/definitions/selector-v1" } ], "title": "PSDocs language" }
MIT
en
microsoft/PSDocs
aada426d103ec33d083d92d122ce1eb99e67c575
2021-07-03T14:51:38
schemas/PSDocs-language.schema.json
136
2024-05-28T02:54:05.219331Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "title": "Annotations", "type": "object" }, "name": { "description": "The name of the resource. This must be unique.", "minLength": 3, "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "selector-v1": { "description": "A PSDocs Selector.", "markdownDescription": "A PSDocs Selector. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md)", "properties": { "apiVersion": { "description": "The API Version for the PSDocs resources.", "enum": [ "github.com/microsoft/PSDocs/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSDocs Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" } ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "equals": { "oneOf": [ { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "string" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "integer" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "boolean" } ] } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notEquals": { "oneOf": [ { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "string" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "integer" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "boolean" } ] } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#allof)", "title": "AllOf", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#anyof)", "title": "AnyOf", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "properties": { "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] } ] }, "selectorSpec": { "additionalProperties": false, "description": "PSDocs selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "description": "A schema for PSDocs YAML language files.", "oneOf": [ { "$ref": "#/definitions/selector-v1" } ], "title": "PSDocs language" }
MIT
en
microsoft/PSDocs
56c62328726350cc28756f53f1952db2e98d26ad
2021-07-12T14:23:12
schemas/PSDocs-language.schema.json
136
2024-05-28T02:54:05.219331Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "title": "Annotations", "type": "object" }, "name": { "description": "The name of the resource. This must be unique.", "minLength": 3, "title": "Name", "type": "string" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "selector-v1": { "description": "A PSDocs Selector.", "markdownDescription": "A PSDocs Selector. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md)", "properties": { "apiVersion": { "description": "The API Version for the PSDocs resources.", "enum": [ "github.com/microsoft/PSDocs/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSDocs Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "equals": { "oneOf": [ { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "string" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "integer" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#equals)", "title": "Equals", "type": "boolean" } ] } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notEquals": { "oneOf": [ { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "string" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "integer" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notequals)", "title": "Not Equals", "type": "boolean" } ] } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#allof)", "title": "AllOf", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#anyof)", "title": "AnyOf", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "properties": { "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://github.com/microsoft/PSDocs/blob/main/docs/concepts/PSDocs/en-US/about_PSDocs_Selectors.md#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] } ] }, "selectorSpec": { "additionalProperties": false, "description": "PSDocs selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "description": "A schema for PSDocs YAML language files.", "oneOf": [ { "$ref": "#/definitions/selector-v1" } ], "title": "PSDocs language" }
MIT
en
microsoft/PSRule
0548563384598042dec845d30cbdaf439c1fb8ac
2021-09-30T05:42:40
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "$ref": "#/definitions/rule-names", "description": "Rules to exclude by name from the baseline.", "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleexclude)", "title": "Exclude rules", "type": "array" }, "include": { "$ref": "#/definitions/rule-names", "description": "Rules to include by name in the baseline.", "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleinclude)", "title": "Include rules", "type": "array" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "title": "Annotations", "type": "object" }, "name": { "description": "The name of the resource. This must be unique.", "minLength": 3, "title": "Name", "type": "string" }, "tags": { "additionalProperties": { "type": "string" }, "title": "Tags", "type": "object" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "rule-name": { "minLength": 3, "type": "string" }, "rule-names": { "items": { "$ref": "#/definitions/rule-name", "type": "string" }, "type": "array", "uniqueItems": true }, "rule-v1": { "description": "A PSRule Rule.", "markdownDescription": "A PSRule Rule. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Rules.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Rule resource.", "enum": [ "Rule" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "PSRule rule specification.", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A PSRule Selector.", "markdownDescription": "A PSRule Selector. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "equals": { "oneOf": [ { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals", "type": "string" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals", "type": "integer" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals", "type": "boolean" } ] } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notEquals": { "oneOf": [ { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals", "type": "string" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals", "type": "integer" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals", "type": "boolean" } ] } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines each of the field values must be unique.", "markdownDescription": "Determines each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#allof)", "title": "AllOf", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#anyof)", "title": "AnyOf", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "PSRule selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" } ] }
MIT
en
microsoft/PSRule
855560d8b25e9ee17e113f358e8f7396e1ad384b
2022-10-03T10:50:18
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to `Warn`, a warning is generated. When set to `Ignore`, no output will be displayed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is true.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is true.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
c75a8c28f477ff7d96a11af1d8008b958e6b7b9e
2022-01-16T20:59:35
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Ignores input files that match the path spec.", "items": { "type": "string" }, "markdownDescription": "Ignores input files that match the path spec. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, and SupportLinks.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, and `SupportLinks`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, and RunInfo.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, and `RunInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "Default" ], "type": "string" }, { "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "number" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
8bd9dcac014ea4f418266d4d98cdf2cc6413b018
2022-11-13T10:06:48
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is true.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is true.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
af6531aa2014566d1b3b55fb6bd1be83c4099cd1
2022-01-14T07:57:03
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "description": "Rules to exclude by name from the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Rules to include by name in the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "baseline": { "$ref": "#/definitions/resourceName", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#rulebaseline)", "title": "Baseline", "type": "string" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "properties": { "obsolete": { "default": false, "description": "A common annotation that flags the resource as obsolete.", "title": "Obsolete", "type": "boolean" } }, "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "tags": { "additionalProperties": { "type": "string" }, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Tag key/ value" } ], "title": "Tags", "type": "object" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-v1": { "description": "A PSRule Rule.", "markdownDescription": "A PSRule Rule. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Rules.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Rule resource.", "enum": [ "Rule" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/ruleMetadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleMetadata": { "description": "Additional information to identify the resource.", "properties": { "alias": { "description": "Alternative names this resource is known by.", "items": { "$ref": "#/definitions/resourceName", "description": "An alternative name.", "title": "Alias", "type": "string" }, "title": "Aliases", "type": "array", "uniqueItems": true }, "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "ref": { "$ref": "#/definitions/resourceName", "description": "An optional stable opaque identifier of this resource for lookup. This must be unique if set.", "title": "Reference" }, "tags": { "additionalProperties": { "type": "string" }, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Tag key/ value" } ], "title": "Tags", "type": "object" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "PSRule rule specification.", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A PSRule Selector.", "markdownDescription": "A PSRule Selector. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" }, { "$ref": "#/definitions/selectorConditionHasSchema" }, { "$ref": "#/definitions/selectorConditionVersion" }, { "$ref": "#/definitions/selectorConditionHasDefault" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "equals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals" } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasDefault": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasdefault)", "title": "Case sensitive", "type": "boolean" }, "hasDefault": { "$ref": "#/definitions/selectorExpressionValue", "description": "The field must either not exist or be set to the configured value.", "markdownDescription": "The field must either not exist or be set to the configured value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasdefault)", "title": "Has Default" } }, "required": [ "hasDefault" ], "type": "object" }, "selectorConditionHasSchema": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing schemas is case-sensitive.", "markdownDescription": "Determines if comparing schemas is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Case sensitive", "type": "boolean" }, "hasSchema": { "default": [], "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "items": { "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "minLength": 1, "title": "Has schema", "type": "string" }, "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Has schema", "type": "array", "uniqueItems": true }, "ignoreScheme": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Ignore scheme", "type": "boolean" } }, "required": [ "hasSchema" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notEquals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals" } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines if each of the field values must be unique.", "markdownDescription": "Determines if each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorConditionVersion": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "includePrerelease": { "default": false, "description": "Determines if pre-release versions are included. By default, pre-release versions are not included.", "markdownDescription": "Determines if pre-release versions are included. By default, pre-release versions are not included. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#version)", "title": "Include pre-release", "type": "boolean" }, "version": { "default": "", "description": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range.", "markdownDescription": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#version)", "title": "Version", "type": "string" } }, "required": [ "version" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValue": { "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "integer" } ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#allof)", "title": "All Of", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#anyof)", "title": "Any Of", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "default": ".", "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "PSRule selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" } ] }
MIT
en
microsoft/PSRule
4d71df338df0d5b90b7438547c9cf10f95016ee2
2021-12-21T04:06:46
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "$ref": "#/definitions/rule-names", "description": "Rules to exclude by name from the baseline.", "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleexclude)", "title": "Exclude rules", "type": "array" }, "include": { "$ref": "#/definitions/rule-names", "description": "Rules to include by name in the baseline.", "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleinclude)", "title": "Include rules", "type": "array" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "baseline": { "$ref": "#/definitions/rule-names", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#rulebaseline)", "title": "Baseline", "type": "string" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "title": "Annotations", "type": "object" }, "name": { "description": "The name of the resource. This must be unique.", "minLength": 3, "title": "Name", "type": "string" }, "tags": { "additionalProperties": { "type": "string" }, "title": "Tags", "type": "object" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "rule-name": { "minLength": 3, "type": "string" }, "rule-names": { "items": { "$ref": "#/definitions/rule-name", "type": "string" }, "type": "array", "uniqueItems": true }, "rule-v1": { "description": "A PSRule Rule.", "markdownDescription": "A PSRule Rule. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Rules.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Rule resource.", "enum": [ "Rule" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "PSRule rule specification.", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A PSRule Selector.", "markdownDescription": "A PSRule Selector. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" }, { "$ref": "#/definitions/selectorConditionHasSchema" }, { "$ref": "#/definitions/selectorConditionVersion" }, { "$ref": "#/definitions/selectorConditionHasDefault" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "equals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals" } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasDefault": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasdefault)", "title": "Case sensitive", "type": "boolean" }, "hasDefault": { "$ref": "#/definitions/selectorExpressionValue", "description": "The field must either not exist or be set to the configured value.", "markdownDescription": "The field must either not exist or be set to the configured value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasdefault)", "title": "Has Default" } }, "required": [ "hasDefault" ], "type": "object" }, "selectorConditionHasSchema": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing schemas is case-sensitive.", "markdownDescription": "Determines if comparing schemas is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Case sensitive", "type": "boolean" }, "hasSchema": { "default": [], "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "items": { "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "minLength": 1, "title": "Has schema", "type": "string" }, "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Has schema", "type": "array", "uniqueItems": true }, "ignoreScheme": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Ignore scheme", "type": "boolean" } }, "required": [ "hasSchema" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notEquals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals" } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines if each of the field values must be unique.", "markdownDescription": "Determines if each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorConditionVersion": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "includePrerelease": { "default": false, "description": "Determines if pre-release versions are included. By default, pre-release versions are not included.", "markdownDescription": "Determines if pre-release versions are included. By default, pre-release versions are not included. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#version)", "title": "Include pre-release", "type": "boolean" }, "version": { "default": "", "description": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range.", "markdownDescription": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#version)", "title": "Version", "type": "string" } }, "required": [ "version" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValue": { "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "integer" } ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#allof)", "title": "All Of", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#anyof)", "title": "Any Of", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "default": ".", "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "PSRule selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" } ] }
MIT
en
microsoft/PSRule
c75a8c28f477ff7d96a11af1d8008b958e6b7b9e
2022-01-16T20:59:35
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "description": "Rules to exclude by name from the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Rules to include by name in the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "baseline": { "$ref": "#/definitions/resourceName", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#rulebaseline)", "title": "Baseline", "type": "string" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "properties": { "obsolete": { "default": false, "description": "A common annotation that flags the resource as obsolete.", "title": "Obsolete", "type": "boolean" } }, "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "resourceTags": { "additionalProperties": { "type": "string" }, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Tag key/ value" } ], "description": "Additional indexed key/ value pairs for the resource.", "title": "Tags", "type": "object" }, "rule-v1": { "description": "A rule resource.", "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A rule resource.", "enum": [ "Rule" ], "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/ruleMetadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleMetadata": { "description": "Additional information to identify the resource.", "properties": { "alias": { "description": "Alternative names this resource is known by.", "items": { "$ref": "#/definitions/resourceName", "description": "An alternative name.", "title": "Alias", "type": "string" }, "title": "Aliases", "type": "array", "uniqueItems": true }, "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "ref": { "$ref": "#/definitions/resourceName", "description": "An optional stable opaque identifier of this resource for lookup. This must be unique if set.", "title": "Reference" }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "The specification for the rule.", "markdownDescription": "The specification for the rule. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "description": "A condition is made up of one or more expressions that will determine if the rule passes or fails.", "markdownDescription": "A condition is made up of one or more [expressions](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/) that will determine if the rule passes or fails. [See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rules/)", "title": "Condition", "type": "object" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A selector resource.", "markdownDescription": "A selector resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" }, { "$ref": "#/definitions/selectorConditionHasSchema" }, { "$ref": "#/definitions/selectorConditionVersion" }, { "$ref": "#/definitions/selectorConditionHasDefault" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "equals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "title": "Equals" } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasDefault": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasdefault)", "title": "Case sensitive", "type": "boolean" }, "hasDefault": { "$ref": "#/definitions/selectorExpressionValue", "description": "The field must either not exist or be set to the configured value.", "markdownDescription": "The field must either not exist or be set to the configured value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasdefault)", "title": "Has Default" } }, "required": [ "hasDefault" ], "type": "object" }, "selectorConditionHasSchema": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing schemas is case-sensitive.", "markdownDescription": "Determines if comparing schemas is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Case sensitive", "type": "boolean" }, "hasSchema": { "default": [], "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "items": { "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "minLength": 1, "title": "Has schema", "type": "string" }, "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Has schema", "type": "array", "uniqueItems": true }, "ignoreScheme": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Ignore scheme", "type": "boolean" } }, "required": [ "hasSchema" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one of the specified values.", "markdownDescription": "Must equal one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notEquals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notequals)", "title": "Not Equals" } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the specified values.", "markdownDescription": "Must not equal any of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines if each of the field values must be unique.", "markdownDescription": "Determines if each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorConditionVersion": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "includePrerelease": { "default": false, "description": "Determines if pre-release versions are included. By default, pre-release versions are not included.", "markdownDescription": "Determines if pre-release versions are included. By default, pre-release versions are not included. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#version)", "title": "Include pre-release", "type": "boolean" }, "version": { "default": "", "description": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range.", "markdownDescription": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#version)", "title": "Version", "type": "string" } }, "required": [ "version" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValue": { "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "integer" } ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#allof)", "title": "All Of", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#anyof)", "title": "Any Of", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "default": ".", "description": "The object path of a field to compare.", "markdownDescription": "The object path of a field to compare. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "The specification for a selector.", "markdownDescription": "The specification for a selector. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "description": "A condition is made up of one or more expressions that will determine if an object is selected by the selector.", "markdownDescription": "A condition is made up of one or more [expressions](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/) that will determine if an object is selected by the selector. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "title": "If", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" }, "suppressionGroup-v1": { "description": "A PSRule Suppression Group", "markdownDescription": "A PSRule Suppression Group. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_SuppressionGroups/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule SuppressionGroup resource.", "enum": [ "SuppressionGroup" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/suppressionGroupSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "SuppressionGroup", "type": "object" }, "suppressionGroupSpec": { "additionalProperties": false, "description": "PSRule Suppression Group specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "rule": { "description": "This only applies to rules that match the specified rule names", "items": { "type": "string" }, "title": "Rule pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" }, { "$ref": "#/definitions/suppressionGroup-v1" } ] }
MIT
en
microsoft/PSRule
cb799e156fb07a66827ac5ed2f5c47c6b5c108cb
2022-08-31T12:36:02
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to `Warn`, a warning is generated. When set to `Ignore`, no output will be displayed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is true.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is true.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
852c2c6c95268f8f48606f5bcb0691d9677d7889
2023-03-27T14:34:53
schemas/PSRule-resources.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "https://json-schema.org/draft-07/schema#", "description": "A meta schema for defining PSRule resources in a JSON document.", "items": { "anyOf": [ { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/rule-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/baseline-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/moduleConfig-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/selector-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/suppressionGroup-v1" } ] }, "title": "PSRule resources", "type": "array" }
MIT
en
microsoft/PSRule
fb1fb4a635c7db139bf213b69b96298f51965721
2022-07-04T22:34:41
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is `true`.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "url": { "description": "The URL to the repository.", "markdownDescription": "The URL to the repository.", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
229f4f6be65aeecb6af34de80e6e70482585f072
2024-05-24T15:57:00
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "baseline-option": { "additionalProperties": false, "description": "Options that configure baselines.", "properties": { "group": { "additionalProperties": { "description": "Maps a group name to a baseline.", "title": "Group mapping", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Group}": "${2:Baseline}" }, "label": "Baseline group" } ], "description": "Configure baseline group names.", "title": "Baseline group", "type": "object" } }, "title": "Baseline options", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_AKS_CLUSTER_MINIMUM_VERSION": { "default": "1.27.7", "description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.", "markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "AKS cluster minimum version", "type": "string" }, "AZURE_BICEP_CHECK_TOOL": { "default": false, "description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.", "markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Checking Bicep Tool", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_BICEP_MINIMUM_VERSION": { "default": "0.4.451", "description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.", "markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep Minimum Version", "type": "string" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "emitter-option": { "additionalProperties": false, "properties": { "json": { "additionalProperties": false, "description": "Support for the JSON format including support for comments.", "properties": { "include": { "default": [], "description": "Additional file types to process as JSON.", "title": "Include", "type": "array" } }, "title": "JSON", "type": "object" }, "markdown": { "additionalProperties": false, "description": "Support for the Markdown format.", "properties": { "include": { "default": [], "description": "Additional file types to process as Markdown.", "title": "Include", "type": "array" } }, "title": "Markdown", "type": "object" }, "yaml": { "additionalProperties": false, "description": "Support for the YAML format.", "properties": { "include": { "default": [], "description": "Additional file types to process as YAML.", "title": "Include", "type": "array" } }, "title": "YAML", "type": "object" } }, "title": "Emitter options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReference": { "default": "Warn", "description": "Determines how to handle when an alias to a resource is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle when an alias to a resource is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreference)", "title": "Alias references", "type": "string" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By default, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By default, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "hashAlgorithm": { "default": "SHA512", "description": "Configures the hashing algorithm used by the PSRule runtime. The default is SHA512.", "enum": [ "SHA512", "SHA384", "SHA256" ], "markdownDescription": "Configures the hashing algorithm used by the PSRule runtime. The default is `SHA512`.\n- When set to `SHA512` the SHA-512 algorithm is used for hashing functions.\n- When set to `SHA384` the SHA-384 algorithm is used for hashing functions.\n- When set to `SHA256` the SHA-256 algorithm is used for hashing functions.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionhashalgorithm)", "title": "Hash Algorithm", "type": "string" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCulture": { "default": "Warn", "description": "Determines how to report when an invariant culture is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report when an invariant culture is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculture)", "title": "Invariant culture", "type": "string" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`.\n- `FullLanguage` - Executes with all language features.\n- `ConstrainedLanguage` - Executes in constrained language mode that restricts the types and methods that can be used.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language Mode", "type": "string" }, "restrictScriptSource": { "default": "Unrestricted", "description": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is Unrestricted.", "enum": [ "Unrestricted", "ModuleOnly", "DisablePowerShell" ], "markdownDescription": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is `Unrestricted`.\n- When set to `Unrestricted` PowerShell language features are allowed from workspace and modules.\n- When set to `ModuleOnly` PowerShell language features are allowed from loaded modules, but script files within the workspace are ignored.\n- When set to `DisablePowerShell` no PowerShell language features are used during PSRule run.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#executionrestrictscriptsource)", "title": "Restrict Script Source", "type": "string" }, "ruleExcluded": { "default": "Ignore", "description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexcluded)", "title": "Rule excluded", "type": "string" }, "ruleInconclusive": { "default": "Warn", "description": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleinconclusive)", "title": "Inconclusive rules", "type": "string" }, "ruleSuppressed": { "default": "Warn", "description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)", "title": "Rule suppressed", "type": "string" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" }, "unprocessedObject": { "default": "Warn", "description": "Determines how to report objects that are not processed by any rule. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report objects that are not processed by any rule. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionunprocessedobject)", "title": "Unprocessed object", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "fileObjects": { "default": false, "description": "Determines if file objects are processed by rules.", "markdownDescription": "Determines if file objects are processed by rules. [See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#inputfileobjects)", "title": "File objects", "type": "boolean" }, "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "baseline": { "$ref": "#/definitions/baseline-option", "type": "object" }, "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "emitter": { "$ref": "#/definitions/emitter-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files.\n\nBy default, the base ref is detected from environment variables set by the build system.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output.\n\nBy default, the repository URL is detected from environment variables set by the build system.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "PSRule options configuration file.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
b4ca7b4db5b7861f7e2d807ee9cc1a06e901af53
2022-03-12T04:58:12
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "description": "Rules to exclude by name from the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Rules to include by name in the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "baseline": { "$ref": "#/definitions/resourceName", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#rulebaseline)", "title": "Baseline", "type": "string" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "properties": { "obsolete": { "default": false, "description": "A common annotation that flags the resource as obsolete.", "title": "Obsolete", "type": "boolean" } }, "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "resourceTags": { "additionalProperties": { "type": "string" }, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Tag key/ value" } ], "description": "Additional indexed key/ value pairs for the resource.", "title": "Tags", "type": "object" }, "rule-v1": { "description": "A rule resource.", "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A rule resource.", "enum": [ "Rule" ], "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/ruleMetadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleMetadata": { "description": "Additional information to identify the resource.", "properties": { "alias": { "description": "Alternative names this resource is known by.", "items": { "$ref": "#/definitions/resourceName", "description": "An alternative name.", "title": "Alias", "type": "string" }, "title": "Aliases", "type": "array", "uniqueItems": true }, "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "ref": { "$ref": "#/definitions/resourceName", "description": "An optional stable opaque identifier of this resource for lookup. This must be unique if set.", "title": "Reference" }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "The specification for the rule.", "markdownDescription": "The specification for the rule. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "description": "A condition is made up of one or more expressions that will determine if the rule passes or fails.", "markdownDescription": "A condition is made up of one or more [expressions](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/) that will determine if the rule passes or fails. [See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rules/)", "title": "Condition", "type": "object" }, "level": { "default": "Error", "description": "If the rule fails, how serious is the result. By default this is set to Error.", "enum": [ "Error", "Warning", "Information" ], "markdownDescription": "If the rule fails, how serious is the result. By default this is set to `Error`. [See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rules/)", "title": "Level", "type": "string" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A selector resource.", "markdownDescription": "A selector resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsArray" }, { "$ref": "#/definitions/selectorConditionIsBoolean" }, { "$ref": "#/definitions/selectorConditionIsDateTime" }, { "$ref": "#/definitions/selectorConditionIsInteger" }, { "$ref": "#/definitions/selectorConditionIsNumeric" }, { "$ref": "#/definitions/selectorConditionIsUpper" }, { "$ref": "#/definitions/selectorConditionHasSchema" }, { "$ref": "#/definitions/selectorConditionVersion" }, { "$ref": "#/definitions/selectorConditionHasDefault" }, { "$ref": "#/definitions/selectorConditionWithinPath" }, { "$ref": "#/definitions/selectorConditionNotWithinPath" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "title": "Case sensitive", "type": "boolean" }, "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "title": "Contains" }, "convert": { "default": false, "description": "Convert type to string.", "markdownDescription": "Convert type to string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "title": "Type conversion", "type": "boolean" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#endswith)", "title": "Case sensitive", "type": "boolean" }, "convert": { "default": false, "description": "Convert type to string.", "markdownDescription": "Convert type to string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#endswith)", "title": "Type conversion", "type": "boolean" }, "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive. Only applies to string values.", "markdownDescription": "Determines if comparing values is case-sensitive. Only applies to string values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "title": "Case sensitive", "type": "boolean" }, "convert": { "default": false, "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "title": "Type conversion", "type": "boolean" }, "equals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "title": "Equals" } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Type conversion", "type": "boolean" }, "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Type conversion", "type": "boolean" }, "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasDefault": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasdefault)", "title": "Case sensitive", "type": "boolean" }, "hasDefault": { "$ref": "#/definitions/selectorExpressionValue", "description": "The field must either not exist or be set to the configured value.", "markdownDescription": "The field must either not exist or be set to the configured value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasdefault)", "title": "Has Default" } }, "required": [ "hasDefault" ], "type": "object" }, "selectorConditionHasSchema": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing schemas is case-sensitive.", "markdownDescription": "Determines if comparing schemas is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Case sensitive", "type": "boolean" }, "hasSchema": { "default": [], "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "items": { "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "minLength": 1, "title": "Has schema", "type": "string" }, "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Has schema", "type": "array", "uniqueItems": true }, "ignoreScheme": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Ignore scheme", "type": "boolean" } }, "required": [ "hasSchema" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one of the specified values.", "markdownDescription": "Must equal one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsArray": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isArray": { "description": "Must be an array type.", "markdownDescription": "Must be an array type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isarray)", "title": "Is array", "type": "boolean" } }, "required": [ "isArray" ], "type": "object" }, "selectorConditionIsBoolean": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to boolean.", "markdownDescription": "Convert type to boolean. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isboolean)", "title": "Type conversion", "type": "boolean" }, "isBoolean": { "description": "Must be a boolean type.", "markdownDescription": "Must be a boolean type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isboolean)", "title": "Is boolean", "type": "boolean" } }, "required": [ "isBoolean" ], "type": "object" }, "selectorConditionIsDateTime": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to datetime.", "markdownDescription": "Convert type to datetime. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isdatetime)", "title": "Type conversion", "type": "boolean" }, "isDateTime": { "description": "Must be a datetime type.", "markdownDescription": "Must be a datetime type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isdatetime)", "title": "Is datetime", "type": "boolean" } }, "required": [ "isDateTime" ], "type": "object" }, "selectorConditionIsInteger": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to integer.", "markdownDescription": "Convert type to integer. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isinteger)", "title": "Type conversion", "type": "boolean" }, "isInteger": { "description": "Must be an integer type.", "markdownDescription": "Must be an integer type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isinteger)", "title": "Is integer", "type": "boolean" } }, "required": [ "isInteger" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsNumeric": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to numeric.", "markdownDescription": "Convert type to numeric. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isnumeric)", "title": "Type conversion", "type": "boolean" }, "isNumeric": { "description": "Must be a numeric type.", "markdownDescription": "Must be a numeric type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isnumeric)", "title": "Is numeric", "type": "boolean" } }, "required": [ "isNumeric" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Type conversion", "type": "boolean" }, "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Type conversion", "type": "boolean" }, "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive. Only applies to string values.", "markdownDescription": "Determines if comparing values is case-sensitive. Only applies to string values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notequals)", "title": "Case sensitive", "type": "boolean" }, "convert": { "default": false, "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notequals)", "title": "Type conversion", "type": "boolean" }, "notEquals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notequals)", "title": "Not Equals" } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the specified values.", "markdownDescription": "Must not equal any of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionNotWithinPath": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notwithinpath)", "title": "Case sensitive", "type": "boolean" }, "notWithinPath": { "default": [], "description": "The file path must not exist within the required paths.", "items": { "type": "string" }, "markdownDescription": "The file path must not exist within the required paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notwithinpath)", "title": "Not Within Path", "type": "array", "uniqueItems": true } }, "required": [ "notWithinPath" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#startswith)", "title": "Case sensitive", "type": "boolean" }, "convert": { "default": false, "description": "Convert type to string.", "markdownDescription": "Convert type to string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#startswith)", "title": "Type conversion", "type": "boolean" }, "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines if each of the field values must be unique.", "markdownDescription": "Determines if each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorConditionVersion": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "includePrerelease": { "default": false, "description": "Determines if pre-release versions are included. By default, pre-release versions are not included.", "markdownDescription": "Determines if pre-release versions are included. By default, pre-release versions are not included. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#version)", "title": "Include pre-release", "type": "boolean" }, "version": { "default": "", "description": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range.", "markdownDescription": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#version)", "title": "Version", "type": "string" } }, "required": [ "version" ], "type": "object" }, "selectorConditionWithinPath": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#withinpath)", "title": "Case sensitive", "type": "boolean" }, "withinPath": { "default": [], "description": "The file path must exist within the required paths.", "items": { "type": "string" }, "markdownDescription": "The file path must exist within the required paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#withinpath)", "title": "Within Path", "type": "array", "uniqueItems": true } }, "required": [ "withinPath" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValue": { "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "integer" } ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#allof)", "title": "All Of", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#anyof)", "title": "Any Of", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" }, { "$ref": "#/definitions/selectorPropertySource" } ] }, "selectorPropertyField": { "properties": { "field": { "default": ".", "description": "The object path of a field to compare.", "markdownDescription": "The object path of a field to compare. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertySource": { "properties": { "source": { "description": "The source of the object currently being processed by the pipeline.", "markdownDescription": "The source of the object currently being processed by the pipeline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#source)", "title": "Source", "type": "string" } }, "required": [ "source" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "The specification for a selector.", "markdownDescription": "The specification for a selector. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "description": "A condition is made up of one or more expressions that will determine if an object is selected by the selector.", "markdownDescription": "A condition is made up of one or more [expressions](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/) that will determine if an object is selected by the selector. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "title": "If", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" }, "suppressionGroup-v1": { "description": "A PSRule Suppression Group", "markdownDescription": "A PSRule Suppression Group. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_SuppressionGroups/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule SuppressionGroup resource.", "enum": [ "SuppressionGroup" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/suppressionGroupSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "SuppressionGroup", "type": "object" }, "suppressionGroupSpec": { "additionalProperties": false, "description": "PSRule Suppression Group specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "rule": { "description": "This only applies to rules that match the specified rule names", "items": { "type": "string" }, "title": "Rule pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" }, { "$ref": "#/definitions/suppressionGroup-v1" } ] }
MIT
en
microsoft/PSRule
72480c81f5df3e45cce7b2753220a15d57b07382
2022-01-05T02:24:02
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Ignores input files that match the path spec.", "items": { "type": "string" }, "markdownDescription": "Ignores input files that match the path spec. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "oneOf": [ { "$ref": "#/definitions/execution-option" } ], "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "oneOf": [ { "$ref": "#/definitions/input-option" } ], "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, and SupportLinks.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, and `SupportLinks`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, and RunInfo.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, and `RunInfo`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "Default" ], "type": "string" }, { "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "number" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputpath)", "title": "Output path", "type": "string" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#requires)", "title": "Required modules", "type": "object" }, "rule-name": { "minLength": 3, "type": "string" }, "rule-names": { "items": { "$ref": "#/definitions/rule-name", "type": "string" }, "type": "array", "uniqueItems": true }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "$ref": "#/definitions/rule-names", "description": "Specifies rules to exclude by name.", "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleexclude)", "title": "Exclude rules", "type": "array" }, "include": { "$ref": "#/definitions/rule-names", "description": "Optionally filter to rules by name.", "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleinclude)", "title": "Include rules", "type": "array" }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
c51fff482be94360baf04e28bbd8d62ff615e54c
2024-05-24T12:32:55
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "baseline-option": { "additionalProperties": false, "description": "Options that configure baselines.", "properties": { "group": { "additionalProperties": { "description": "Maps a group name to a baseline.", "title": "Group mapping", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Group}": "${2:Baseline}" }, "label": "Baseline group" } ], "description": "Configure baseline group names.", "title": "Baseline group", "type": "object" } }, "title": "Baseline options", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_AKS_CLUSTER_MINIMUM_VERSION": { "default": "1.27.7", "description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.", "markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "AKS cluster minimum version", "type": "string" }, "AZURE_BICEP_CHECK_TOOL": { "default": false, "description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.", "markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Checking Bicep Tool", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_BICEP_MINIMUM_VERSION": { "default": "0.4.451", "description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.", "markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep Minimum Version", "type": "string" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "emitter-option": { "additionalProperties": false, "properties": { "json": { "additionalProperties": false, "description": "Support for the JSON format including support for comments.", "properties": { "include": { "default": [], "description": "Additional file types to process as JSON.", "title": "Include", "type": "array" } }, "title": "JSON", "type": "object" }, "markdown": { "additionalProperties": false, "description": "Support for the Markdown format.", "properties": { "include": { "default": [], "description": "Additional file types to process as Markdown.", "title": "Include", "type": "array" } }, "title": "Markdown", "type": "object" }, "yaml": { "additionalProperties": false, "description": "Support for the YAML format.", "properties": { "include": { "default": [], "description": "Additional file types to process as YAML.", "title": "Include", "type": "array" } }, "title": "YAML", "type": "object" } }, "title": "Emitter options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReference": { "default": "Warn", "description": "Determines how to handle when an alias to a resource is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle when an alias to a resource is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreference)", "title": "Alias references", "type": "string" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By default, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By default, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "hashAlgorithm": { "default": "SHA512", "description": "Configures the hashing algorithm used by the PSRule runtime. The default is SHA512.", "enum": [ "SHA512", "SHA384", "SHA256" ], "markdownDescription": "Configures the hashing algorithm used by the PSRule runtime. The default is `SHA512`.\n- When set to `SHA512` the SHA-512 algorithm is used for hashing functions.\n- When set to `SHA384` the SHA-384 algorithm is used for hashing functions.\n- When set to `SHA256` the SHA-256 algorithm is used for hashing functions.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionhashalgorithm)", "title": "Hash Algorithm", "type": "string" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCulture": { "default": "Warn", "description": "Determines how to report when an invariant culture is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report when an invariant culture is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculture)", "title": "Invariant culture", "type": "string" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`.\n- `FullLanguage` - Executes with all language features.\n- `ConstrainedLanguage` - Executes in constrained language mode that restricts the types and methods that can be used.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language Mode", "type": "string" }, "restrictScriptSource": { "default": "Unrestricted", "description": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is Unrestricted.", "enum": [ "Unrestricted", "ModuleOnly", "DisablePowerShell" ], "markdownDescription": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is `Unrestricted`.\n- When set to `Unrestricted` PowerShell language features are allowed from workspace and modules.\n- When set to `ModuleOnly` PowerShell language features are allowed from loaded modules, but script files within the workspace are ignored.\n- When set to `DisablePowerShell` no PowerShell language features are used during PSRule run.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#executionrestrictscriptsource)", "title": "Restrict Script Source", "type": "string" }, "ruleExcluded": { "default": "Ignore", "description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexcluded)", "title": "Rule excluded", "type": "string" }, "ruleInconclusive": { "default": "Warn", "description": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleinconclusive)", "title": "Inconclusive rules", "type": "string" }, "ruleSuppressed": { "default": "Warn", "description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)", "title": "Rule suppressed", "type": "string" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" }, "unprocessedObject": { "default": "Warn", "description": "Determines how to report objects that are not processed by any rule. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report objects that are not processed by any rule. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionunprocessedobject)", "title": "Unprocessed object", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "fileObjects": { "default": false, "description": "Determines if file objects are processed by rules.", "markdownDescription": "Determines if file objects are processed by rules. [See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#fileobjects)", "title": "File objects", "type": "boolean" }, "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "baseline": { "$ref": "#/definitions/baseline-option", "type": "object" }, "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "emitter": { "$ref": "#/definitions/emitter-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files.\n\nBy default, the base ref is detected from environment variables set by the build system.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output.\n\nBy default, the repository URL is detected from environment variables set by the build system.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "PSRule options configuration file.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
0f29bcab9b28aeed887df59a920f03b1011fc8a2
2021-11-08T12:51:54
schemas/PSRule-resources.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "description": "A schema for PSRule resources.", "items": { "anyOf": [ { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/rule-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/baseline-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/moduleConfig-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/selector-v1" } ] }, "title": "PSRule resources", "type": "array" }
MIT
en
microsoft/PSRule
d6d90a156872f711efc5266134133182032af739
2022-01-30T03:43:13
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "description": "Rules to exclude by name from the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Rules to include by name in the baseline.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "baseline": { "$ref": "#/definitions/resourceName", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#rulebaseline)", "title": "Baseline", "type": "string" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "properties": { "obsolete": { "default": false, "description": "A common annotation that flags the resource as obsolete.", "title": "Obsolete", "type": "boolean" } }, "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "resourceTags": { "additionalProperties": { "type": "string" }, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Tag key/ value" } ], "description": "Additional indexed key/ value pairs for the resource.", "title": "Tags", "type": "object" }, "rule-v1": { "description": "A rule resource.", "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A rule resource.", "enum": [ "Rule" ], "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/ruleMetadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleMetadata": { "description": "Additional information to identify the resource.", "properties": { "alias": { "description": "Alternative names this resource is known by.", "items": { "$ref": "#/definitions/resourceName", "description": "An alternative name.", "title": "Alias", "type": "string" }, "title": "Aliases", "type": "array", "uniqueItems": true }, "annotations": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Annotation key/ value" } ], "description": "Additional annotations for the resource.", "title": "Annotations", "type": "object" }, "name": { "$ref": "#/definitions/resourceName", "description": "The name of the resource. This must be unique.", "title": "Name", "type": "string" }, "ref": { "$ref": "#/definitions/resourceName", "description": "An optional stable opaque identifier of this resource for lookup. This must be unique if set.", "title": "Reference" }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "The specification for the rule.", "markdownDescription": "The specification for the rule. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "description": "A condition is made up of one or more expressions that will determine if the rule passes or fails.", "markdownDescription": "A condition is made up of one or more [expressions](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/) that will determine if the rule passes or fails. [See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rules/)", "title": "Condition", "type": "object" }, "level": { "default": "Error", "description": "If the rule fails, how serious is the result. By default this is set to Error.", "enum": [ "Error", "Warning", "Information" ], "markdownDescription": "If the rule fails, how serious is the result. By default this is set to `Error`. [See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rules/)", "title": "Level", "type": "string" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A selector resource.", "markdownDescription": "A selector resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsArray" }, { "$ref": "#/definitions/selectorConditionIsBoolean" }, { "$ref": "#/definitions/selectorConditionIsDateTime" }, { "$ref": "#/definitions/selectorConditionIsInteger" }, { "$ref": "#/definitions/selectorConditionIsNumeric" }, { "$ref": "#/definitions/selectorConditionIsUpper" }, { "$ref": "#/definitions/selectorConditionHasSchema" }, { "$ref": "#/definitions/selectorConditionVersion" }, { "$ref": "#/definitions/selectorConditionHasDefault" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "equals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "title": "Equals" } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasDefault": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasdefault)", "title": "Case sensitive", "type": "boolean" }, "hasDefault": { "$ref": "#/definitions/selectorExpressionValue", "description": "The field must either not exist or be set to the configured value.", "markdownDescription": "The field must either not exist or be set to the configured value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasdefault)", "title": "Has Default" } }, "required": [ "hasDefault" ], "type": "object" }, "selectorConditionHasSchema": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing schemas is case-sensitive.", "markdownDescription": "Determines if comparing schemas is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Case sensitive", "type": "boolean" }, "hasSchema": { "default": [], "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "items": { "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "minLength": 1, "title": "Has schema", "type": "string" }, "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Has schema", "type": "array", "uniqueItems": true }, "ignoreScheme": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasschema)", "title": "Ignore scheme", "type": "boolean" } }, "required": [ "hasSchema" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one of the specified values.", "markdownDescription": "Must equal one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsArray": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isArray": { "description": "Must be an array type.", "markdownDescription": "Must be an array type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isarray)", "title": "Is array", "type": "boolean" } }, "required": [ "isArray" ], "type": "object" }, "selectorConditionIsBoolean": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to boolean.", "markdownDescription": "Convert type to boolean. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isboolean)", "title": "Type conversion", "type": "boolean" }, "isBoolean": { "description": "Must be a boolean type.", "markdownDescription": "Must be a boolean type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isboolean)", "title": "Is boolean", "type": "boolean" } }, "required": [ "isBoolean" ], "type": "object" }, "selectorConditionIsDateTime": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to datetime.", "markdownDescription": "Convert type to datetime. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isdatetime)", "title": "Type conversion", "type": "boolean" }, "isDateTime": { "description": "Must be a datetime type.", "markdownDescription": "Must be a datetime type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isdatetime)", "title": "Is datetime", "type": "boolean" } }, "required": [ "isDateTime" ], "type": "object" }, "selectorConditionIsInteger": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to integer.", "markdownDescription": "Convert type to integer. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isinteger)", "title": "Type conversion", "type": "boolean" }, "isInteger": { "description": "Must be an integer type.", "markdownDescription": "Must be an integer type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isinteger)", "title": "Is integer", "type": "boolean" } }, "required": [ "isInteger" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsNumeric": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "convert": { "default": false, "description": "Convert type to numeric.", "markdownDescription": "Convert type to numeric. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isnumeric)", "title": "Type conversion", "type": "boolean" }, "isNumeric": { "description": "Must be a numeric type.", "markdownDescription": "Must be a numeric type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isnumeric)", "title": "Is numeric", "type": "boolean" } }, "required": [ "isNumeric" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notEquals": { "$ref": "#/definitions/selectorExpressionValue", "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notequals)", "title": "Not Equals" } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the specified values.", "markdownDescription": "Must not equal any of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines if comparing values is case-sensitive.", "markdownDescription": "Determines if comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines if each of the field values must be unique.", "markdownDescription": "Determines if each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorConditionVersion": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "includePrerelease": { "default": false, "description": "Determines if pre-release versions are included. By default, pre-release versions are not included.", "markdownDescription": "Determines if pre-release versions are included. By default, pre-release versions are not included. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#version)", "title": "Include pre-release", "type": "boolean" }, "version": { "default": "", "description": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range.", "markdownDescription": "Must be a valid semantic version. A constraint can optionally be provided to require the semantic version to be within a range. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#version)", "title": "Version", "type": "string" } }, "required": [ "version" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValue": { "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "integer" } ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#allof)", "title": "All Of", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#anyof)", "title": "Any Of", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "default": ".", "description": "The object path of a field to compare.", "markdownDescription": "The object path of a field to compare. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "The specification for a selector.", "markdownDescription": "The specification for a selector. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "description": "A condition is made up of one or more expressions that will determine if an object is selected by the selector.", "markdownDescription": "A condition is made up of one or more [expressions](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/) that will determine if an object is selected by the selector. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Selectors/)", "title": "If", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" }, "suppressionGroup-v1": { "description": "A PSRule Suppression Group", "markdownDescription": "A PSRule Suppression Group. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_SuppressionGroups/)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule SuppressionGroup resource.", "enum": [ "SuppressionGroup" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/suppressionGroupSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "SuppressionGroup", "type": "object" }, "suppressionGroupSpec": { "additionalProperties": false, "description": "PSRule Suppression Group specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "rule": { "description": "This only applies to rules that match the specified rule names", "items": { "type": "string" }, "title": "Rule pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" }, { "$ref": "#/definitions/suppressionGroup-v1" } ] }
MIT
en
microsoft/PSRule
8bff501a6f5b058a51298e3a1db197d270b79d77
2022-02-04T16:11:50
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is `true`.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Ignores input files that match the path spec.", "items": { "type": "string" }, "markdownDescription": "Ignores input files that match the path spec. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, and SupportLinks.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, and `SupportLinks`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, and RunInfo.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, and `RunInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "Default" ], "type": "string" }, { "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
85e180ed5343d564fd2f3d9d22d03f6dfc9e530d
2021-11-22T02:05:03
schemas/PSRule-language.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "baseline-v1": { "additionalProperties": false, "description": "A PSRule Baseline.", "markdownDescription": "A PSRule Baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Baseline resource.", "enum": [ "Baseline" ], "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/baselineSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Baseline", "type": "object" }, "baselineSpec": { "additionalProperties": false, "description": "A specification for a baseline.", "markdownDescription": "A specification for a baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Baseline.html)", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "exclude": { "$ref": "#/definitions/rule-names", "description": "Rules to exclude by name from the baseline.", "markdownDescription": "Rules to exclude by name from the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleexclude)", "title": "Exclude rules", "type": "array" }, "include": { "$ref": "#/definitions/rule-names", "description": "Rules to include by name in the baseline.", "markdownDescription": "Rules to include by name in the baseline. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruleinclude)", "title": "Include rules", "type": "array" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#conventioninclude)", "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "moduleConfig-v1": { "additionalProperties": false, "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/moduleConfigSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "ModuleConfig", "type": "object" }, "moduleConfigSpec": { "additionalProperties": false, "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true } }, "title": "Output options", "type": "object" }, "rule": { "additionalProperties": false, "description": "A filter for included or excluded rules.", "properties": { "baseline": { "$ref": "#/definitions/rule-names", "description": "The name of a baseline to use.", "markdownDescription": "The name of a baseline to use. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Options.html#rulebaseline)", "title": "Baseline", "type": "string" } }, "title": "Rule", "type": "object" } }, "title": "Spec", "type": "object" }, "resource-metadata": { "description": "Additional information to identify the resource.", "properties": { "annotations": { "title": "Annotations", "type": "object" }, "name": { "description": "The name of the resource. This must be unique.", "minLength": 3, "title": "Name", "type": "string" }, "tags": { "additionalProperties": { "type": "string" }, "title": "Tags", "type": "object" } }, "required": [ "name" ], "title": "Metadata", "type": "object" }, "rule-name": { "minLength": 3, "type": "string" }, "rule-names": { "items": { "$ref": "#/definitions/rule-name", "type": "string" }, "type": "array", "uniqueItems": true }, "rule-v1": { "description": "A PSRule Rule.", "markdownDescription": "A PSRule Rule. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Rules.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Rule resource.", "enum": [ "Rule" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/ruleSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Rule", "type": "object" }, "ruleSpec": { "additionalProperties": false, "description": "PSRule rule specification.", "properties": { "condition": { "$ref": "#/definitions/selectorExpression", "type": "object" }, "type": { "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string" }, "title": "Type pre-condition", "type": "array", "uniqueItems": true }, "with": { "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string" }, "title": "Selector pre-condition", "type": "array", "uniqueItems": true } }, "required": [ "condition" ], "title": "Spec", "type": "object" }, "selector-v1": { "description": "A PSRule Selector.", "markdownDescription": "A PSRule Selector. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html)", "properties": { "apiVersion": { "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ], "title": "API Version", "type": "string" }, "kind": { "description": "A PSRule Selector resource.", "enum": [ "Selector" ], "title": "Kind", "type": "string" }, "metadata": { "$ref": "#/definitions/resource-metadata", "type": "object" }, "spec": { "$ref": "#/definitions/selectorSpec", "type": "object" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "title": "Selector", "type": "object" }, "selectorCondition": { "oneOf": [ { "$ref": "#/definitions/selectorConditionExists" }, { "$ref": "#/definitions/selectorConditionEquals" }, { "$ref": "#/definitions/selectorConditionNotEquals" }, { "$ref": "#/definitions/selectorConditionHasValue" }, { "$ref": "#/definitions/selectorConditionMatch" }, { "$ref": "#/definitions/selectorConditionNotMatch" }, { "$ref": "#/definitions/selectorConditionIn" }, { "$ref": "#/definitions/selectorConditionNotIn" }, { "$ref": "#/definitions/selectorConditionSetOf" }, { "$ref": "#/definitions/selectorConditionSubset" }, { "$ref": "#/definitions/selectorConditionCount" }, { "$ref": "#/definitions/selectorConditionLess" }, { "$ref": "#/definitions/selectorConditionLessOrEquals" }, { "$ref": "#/definitions/selectorConditionGreater" }, { "$ref": "#/definitions/selectorConditionGreaterOrEquals" }, { "$ref": "#/definitions/selectorConditionStartsWith" }, { "$ref": "#/definitions/selectorConditionEndsWith" }, { "$ref": "#/definitions/selectorConditionContains" }, { "$ref": "#/definitions/selectorConditionIsString" }, { "$ref": "#/definitions/selectorConditionIsLower" }, { "$ref": "#/definitions/selectorConditionIsUpper" }, { "$ref": "#/definitions/selectorConditionHasSchema" } ], "type": "object" }, "selectorConditionContains": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "contains": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#contains)", "title": "Contains" } }, "required": [ "contains" ], "type": "object" }, "selectorConditionCount": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "count": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#count)", "minimum": 0, "title": "Count", "type": "integer" } }, "required": [ "count" ], "type": "object" }, "selectorConditionEndsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "endsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must end with one of the specified values.", "markdownDescription": "Must end with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#endswith)", "title": "Ends with" } }, "required": [ "endsWith" ], "type": "object" }, "selectorConditionEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "equals": { "oneOf": [ { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals", "type": "string" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals", "type": "integer" }, { "description": "Must have the specified value.", "markdownDescription": "Must have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#equals)", "title": "Equals", "type": "boolean" } ] } }, "required": [ "equals" ], "type": "object" }, "selectorConditionExists": { "properties": { "exists": { "description": "Must have the named field.", "markdownDescription": "Must have the named field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#exists)", "title": "Exists", "type": "boolean" }, "field": { "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "exists", "field" ], "type": "object" }, "selectorConditionGreater": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greater": { "description": "Must be greater then the specified value.", "markdownDescription": "Must be greater then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greater)", "title": "Greater", "type": "integer" } }, "required": [ "greater" ], "type": "object" }, "selectorConditionGreaterOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "greaterOrEquals": { "description": "Must be greater or equal to the specified value.", "markdownDescription": "Must be greater or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#greaterorequals)", "title": "Greater or Equal to", "type": "integer" } }, "required": [ "greaterOrEquals" ], "type": "object" }, "selectorConditionHasSchema": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines comparing schemas is case-sensitive.", "markdownDescription": "Determines comparing schemas is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Case sensitive", "type": "boolean" }, "hasSchema": { "default": [], "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "items": { "description": "Must use one of the specified schemas of the value of $schema. If an empty array is specified any non-empty $schema can be specified.", "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "minLength": 1, "title": "Has schema", "type": "string" }, "markdownDescription": "Must use one of the specified schemas of the value of `$schema`. If an empty array is specified any non-empty `$schema` can be specified [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Has schema", "type": "array", "uniqueItems": true }, "ignoreScheme": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasschema)", "title": "Ignore scheme", "type": "boolean" } }, "required": [ "hasSchema" ], "type": "object" }, "selectorConditionHasValue": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "hasValue": { "description": "Must have a non-empty value.", "markdownDescription": "Must have a non-empty value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#hasvalue)", "title": "Has Value", "type": "boolean" } }, "required": [ "hasValue" ], "type": "object" }, "selectorConditionIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "in": { "description": "Must equal one the values.", "markdownDescription": "Must equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#in)", "title": "In", "type": "array" } }, "required": [ "in" ], "type": "object" }, "selectorConditionIsLower": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isLower": { "description": "Must be a lowercase string.", "markdownDescription": "Must be a lowercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#islower)", "title": "Is Lowercase", "type": "boolean" } }, "required": [ "isLower" ], "type": "object" }, "selectorConditionIsString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isString": { "description": "Must be a string type.", "markdownDescription": "Must be a string type. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isstring)", "title": "Is string", "type": "boolean" } }, "required": [ "isString" ], "type": "object" }, "selectorConditionIsUpper": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "isUpper": { "description": "Must be an uppercase string.", "markdownDescription": "Must be an uppercase string. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#isupper)", "title": "Is Uppercase", "type": "boolean" } }, "required": [ "isUpper" ], "type": "object" }, "selectorConditionLess": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "less": { "description": "Must be less then the specified value.", "markdownDescription": "Must be less then the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#less)", "title": "Less", "type": "integer" } }, "required": [ "less" ], "type": "object" }, "selectorConditionLessOrEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "lessOrEquals": { "description": "Must be less or equal to the specified value.", "markdownDescription": "Must be less or equal to the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#lessorequals)", "title": "Less or Equal to", "type": "integer" } }, "required": [ "lessOrEquals" ], "type": "object" }, "selectorConditionMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "match": { "description": "Must match the regular expression.", "markdownDescription": "Must match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#match)", "title": "Match", "type": "string" } }, "required": [ "match" ], "type": "object" }, "selectorConditionNotEquals": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notEquals": { "oneOf": [ { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals", "type": "string" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals", "type": "integer" }, { "description": "Must not have the specified value.", "markdownDescription": "Must not have the specified value. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notequals)", "title": "Not Equals", "type": "boolean" } ] } }, "required": [ "notEquals" ], "type": "object" }, "selectorConditionNotIn": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notIn": { "description": "Must not equal any of the values.", "markdownDescription": "Must not equal one the values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notin)", "title": "Not In", "type": "array" } }, "required": [ "notIn" ], "type": "object" }, "selectorConditionNotMatch": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "notMatch": { "description": "Must not match the regular expression.", "markdownDescription": "Must not match the regular expression. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#notmatch)", "title": "Not Match", "type": "string" } }, "required": [ "notMatch" ], "type": "object" }, "selectorConditionSetOf": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "Case sensitive", "type": "boolean" }, "setOf": { "description": "Must include all of but only specified values.", "markdownDescription": "Must include all of but only values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#setof)", "title": "SetOf", "type": "array" } }, "required": [ "setOf" ], "type": "object" }, "selectorConditionStartsWith": { "oneOf": [ { "$ref": "#/definitions/selectorPropertiesString" } ], "properties": { "startsWith": { "$ref": "#/definitions/selectorExpressionValueMultiString", "description": "Must start with one of the specified values.", "markdownDescription": "Must start with one of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#startswith)", "title": "Starts with" } }, "required": [ "startsWith" ], "type": "object" }, "selectorConditionSubset": { "oneOf": [ { "$ref": "#/definitions/selectorProperties" } ], "properties": { "caseSensitive": { "default": false, "description": "Determines comparing values is case-sensitive.", "markdownDescription": "Determines comparing values is case-sensitive. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Case sensitive", "type": "boolean" }, "subset": { "description": "Must include all of the specified values.", "markdownDescription": "Must include all of the specified values. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Subset", "type": "array" }, "unique": { "default": false, "description": "Determines each of the field values must be unique.", "markdownDescription": "Determines each of the field values must be unique. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#subset)", "title": "Unique", "type": "boolean" } }, "required": [ "subset" ], "type": "object" }, "selectorExpression": { "oneOf": [ { "$ref": "#/definitions/selectorOperator" }, { "$ref": "#/definitions/selectorCondition" } ], "type": "object" }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "selectorOperator": { "oneOf": [ { "$ref": "#/definitions/selectorOperatorAllOf" }, { "$ref": "#/definitions/selectorOperatorAnyOf" }, { "$ref": "#/definitions/selectorOperatorNot" } ], "type": "object" }, "selectorOperatorAllOf": { "additionalProperties": false, "properties": { "allOf": { "description": "All of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#allof)", "title": "AllOf", "type": "array" } }, "required": [ "allOf" ], "type": "object" }, "selectorOperatorAnyOf": { "additionalProperties": false, "properties": { "anyOf": { "description": "One of the expressions must be true.", "items": { "$ref": "#/definitions/selectorExpression" }, "markdownDescription": "All of the expressions must be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#anyof)", "title": "AnyOf", "type": "array" } }, "required": [ "anyOf" ], "type": "object" }, "selectorOperatorNot": { "properties": { "not": { "$ref": "#/definitions/selectorExpression", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#not)", "title": "Not", "type": "object" } }, "required": [ "not" ], "type": "object" }, "selectorProperties": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" } ] }, "selectorPropertiesString": { "oneOf": [ { "$ref": "#/definitions/selectorPropertyField" }, { "$ref": "#/definitions/selectorPropertyType" }, { "$ref": "#/definitions/selectorPropertyName" } ] }, "selectorPropertyField": { "properties": { "field": { "default": ".", "description": "The path of the field.", "markdownDescription": "The path of the field. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#field)", "title": "Field", "type": "string" } }, "required": [ "field" ] }, "selectorPropertyName": { "properties": { "name": { "default": ".", "description": "The target name of the object.", "markdownDescription": "The target name of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#name)", "title": "Name", "type": "string" } }, "required": [ "name" ] }, "selectorPropertyType": { "properties": { "type": { "default": ".", "description": "The target type of the object.", "markdownDescription": "The target type of the object. [See help](https://microsoft.github.io/PSRule/concepts/PSRule/en-US/about_PSRule_Selectors.html#type)", "title": "Type", "type": "string" } }, "required": [ "type" ] }, "selectorSpec": { "additionalProperties": false, "description": "PSRule selector specification.", "properties": { "if": { "$ref": "#/definitions/selectorExpression", "type": "object" } }, "required": [ "if" ], "title": "Spec", "type": "object" } }, "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" } ] }
MIT
en
microsoft/PSRule
5a52e4d9004e230ee83124c0e1f953c85f6b3f19
2022-03-20T15:03:07
schemas/PSRule-resources.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "https://json-schema.org/draft-07/schema#", "description": "A schema for PSRule resources.", "items": { "anyOf": [ { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/rule-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/baseline-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/moduleConfig-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/selector-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/suppressionGroup-v1" } ] }, "title": "PSRule resources", "type": "array" }
MIT
en
microsoft/PSRule
77f4d293742324bfe06eb2880f48c1be2fe0654f
2022-02-27T03:56:23
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is `true`.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Ignores input files that match the path spec.", "items": { "type": "string" }, "markdownDescription": "Ignores input files that match the path spec. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, and RunInfo.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, and `RunInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "Default" ], "type": "string" }, { "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "url": { "description": "The URL to the repository.", "markdownDescription": "The URL to the repository.", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
c0c0600cc80b600f8324fa7b38fd03da8c9638ba
2024-01-27T06:34:49
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "baseline-option": { "additionalProperties": false, "description": "Options that configure baselines.", "properties": { "group": { "additionalProperties": { "description": "Maps a group name to a baseline.", "title": "Group mapping", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Group}": "${2:Baseline}" }, "label": "Baseline group" } ], "description": "Configure baseline group names.", "title": "Baseline group", "type": "object" } }, "title": "Baseline options", "type": "object" }, "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_AKS_CLUSTER_MINIMUM_VERSION": { "default": "1.27.7", "description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.", "markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "AKS cluster minimum version", "type": "string" }, "AZURE_BICEP_CHECK_TOOL": { "default": false, "description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.", "markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Checking Bicep Tool", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_BICEP_MINIMUM_VERSION": { "default": "0.4.451", "description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.", "markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep Minimum Version", "type": "string" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReference": { "default": "Warn", "description": "Determines how to handle when an alias to a resource is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle when an alias to a resource is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreference)", "title": "Alias references", "type": "string" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By default, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By default, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "hashAlgorithm": { "default": "SHA512", "description": "Configures the hashing algorithm used by the PSRule runtime. The default is SHA512.", "enum": [ "SHA512", "SHA384", "SHA256" ], "markdownDescription": "Configures the hashing algorithm used by the PSRule runtime. The default is `SHA512`.\n- When set to `SHA512` the SHA-512 algorithm is used for hashing functions.\n- When set to `SHA384` the SHA-384 algorithm is used for hashing functions.\n- When set to `SHA256` the SHA-256 algorithm is used for hashing functions.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionhashalgorithm)", "title": "Hash Algorithm", "type": "string" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCulture": { "default": "Warn", "description": "Determines how to report when an invariant culture is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report when an invariant culture is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculture)", "title": "Invariant culture", "type": "string" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`.\n- `FullLanguage` - Executes with all language features.\n- `ConstrainedLanguage` - Executes in constrained language mode that restricts the types and methods that can be used.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language Mode", "type": "string" }, "restrictScriptSource": { "default": "Unrestricted", "description": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is Unrestricted.", "enum": [ "Unrestricted", "ModuleOnly", "DisablePowerShell" ], "markdownDescription": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is `Unrestricted`.\n- When set to `Unrestricted` PowerShell language features are allowed from workspace and modules.\n- When set to `ModuleOnly` PowerShell language features are allowed from loaded modules, but script files within the workspace are ignored.\n- When set to `DisablePowerShell` no PowerShell language features are used during PSRule run.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#executionrestrictscriptsource)", "title": "Restrict Script Source", "type": "string" }, "ruleExcluded": { "default": "Ignore", "description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexcluded)", "title": "Rule excluded", "type": "string" }, "ruleInconclusive": { "default": "Warn", "description": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleinconclusive)", "title": "Inconclusive rules", "type": "string" }, "ruleSuppressed": { "default": "Warn", "description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)", "title": "Rule suppressed", "type": "string" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" }, "unprocessedObject": { "default": "Warn", "description": "Determines how to report objects that are not processed by any rule. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report objects that are not processed by any rule. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionunprocessedobject)", "title": "Unprocessed object", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "baseline": { "$ref": "#/definitions/baseline-option", "type": "object" }, "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files.\n\nBy default, the base ref is detected from environment variables set by the build system.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output.\n\nBy default, the repository URL is detected from environment variables set by the build system.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Rule options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "PSRule options configuration file.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
657c0543fe9310348d0d68fbfa143e00983a7da7
2023-04-23T11:41:32
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_AKS_CLUSTER_MINIMUM_VERSION": { "default": "1.25.4", "description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.", "markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "AKS cluster minimum version", "type": "string" }, "AZURE_BICEP_CHECK_TOOL": { "default": false, "description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.", "markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Checking Bicep Tool", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_BICEP_MINIMUM_VERSION": { "default": "0.4.451", "description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.", "markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep Minimum Version", "type": "string" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReference": { "default": "Warn", "description": "Determines how to handle when an alias to a resource is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces aliasReferenceWarning. You do not need to configure both options. If aliasReferenceWarning is configured, it will override aliasReference with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle when an alias to a resource is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `aliasReferenceWarning`. You do not need to configure both options. If `aliasReferenceWarning` is configured, it will override `aliasReference` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreference)", "title": "Alias references", "type": "string" }, "aliasReferenceWarning": { "default": true, "deprecated": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases | DEPRECATED", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "deprecated": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules | DEPRECATED", "type": "boolean" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCulture": { "default": "Warn", "description": "Determines how to report when an invariant culture is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces invariantCultureWarning. You do not need to configure both options. If invariantCultureWarning is configured, it will override invariantCulture with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report when an invariant culture is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `invariantCultureWarning`. You do not need to configure both options. If `invariantCultureWarning` is configured, it will override `invariantCulture` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculture)", "title": "Invariant culture", "type": "string" }, "invariantCultureWarning": { "default": true, "deprecated": true, "description": "Enable or disable warning when invariant culture is used. The default is true.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture | DEPRECATED", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "deprecated": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects | DEPRECATED", "type": "boolean" }, "ruleExcluded": { "default": "Ignore", "description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexcluded)", "title": "Rule excluded", "type": "string" }, "ruleInconclusive": { "default": "Warn", "description": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces inconclusiveWarning. You do not need to configure both options. If inconclusiveWarning is configured, it will override ruleInconclusive with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `inconclusiveWarning`. You do not need to configure both options. If `inconclusiveWarning` is configured, it will override `ruleInconclusive` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleinconclusive)", "title": "Inconclusive rules", "type": "string" }, "ruleSuppressed": { "default": "Warn", "description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces suppressedRuleWarning. You do not need to configure both options. If suppressedRuleWarning is configured, it will override ruleSuppressed with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `suppressedRuleWarning`. You do not need to configure both options. If `suppressedRuleWarning` is configured, it will override `ruleSuppressed` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)", "title": "Rule suppressed", "type": "string" }, "suppressedRuleWarning": { "default": true, "deprecated": true, "description": "This option has been deprecated and will be removed from v3 in favor of ruleSuppressed. Enable or disable warnings for suppressed rules. The default is true.", "markdownDescription": "This option has been deprecated and will be removed from v3 in favor of `ruleSuppressed`.\n\nEnable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules | DEPRECATED", "type": "boolean" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" }, "unprocessedObject": { "default": "Warn", "description": "Determines how to report objects that are not processed by any rule. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces notProcessedWarning. You do not need to configure both options. If notProcessedWarning is configured, it will override unprocessedObject with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to report objects that are not processed by any rule. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `notProcessedWarning`. You do not need to configure both options. If `notProcessedWarning` is configured, it will override `unprocessedObject` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionunprocessedobject)", "title": "Unprocessed object", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "PSRule options configuration file.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
8bd9dcac014ea4f418266d4d98cdf2cc6413b018
2022-11-13T10:06:48
schemas/PSRule-resources.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "https://json-schema.org/draft-07/schema#", "description": "A schema for PSRule resources.", "items": { "anyOf": [ { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/rule-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/baseline-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/moduleConfig-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/selector-v1" }, { "$ref": "https://raw.githubusercontent.com/microsoft/PSRule/main/schemas/PSRule-language.schema.json#/definitions/suppressionGroup-v1" } ] }, "title": "PSRule resources", "type": "array" }
MIT
en
microsoft/PSRule
852c2c6c95268f8f48606f5bcb0691d9677d7889
2023-03-27T14:34:53
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_AKS_CLUSTER_MINIMUM_VERSION": { "default": "1.25.4", "description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.", "markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "AKS cluster minimum version", "type": "string" }, "AZURE_BICEP_CHECK_TOOL": { "default": false, "description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.", "markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Checking Bicep Tool", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_BICEP_MINIMUM_VERSION": { "default": "0.4.451", "description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.", "markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep Minimum Version", "type": "string" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is true.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "ruleExcluded": { "default": "Ignore", "description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexecluded)", "title": "Rule excluded", "type": "string" }, "ruleSuppressed": { "default": "Warn", "description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces suppressedRuleWarning. You do not need to configure both options. If suppressedRuleWarning is configured, it will override ruleSuppressed with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `suppressedRuleWarning`. You do not need to configure both options. If `suppressedRuleWarning` is configured, it will override `ruleSuppressed` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)", "title": "Rule suppressed", "type": "string" }, "suppressedRuleWarning": { "default": true, "deprecated": true, "description": "This option has been deprecated and will be removed from v3 in favor of ruleSuppressed. Enable or disable warnings for suppressed rules. The default is true.", "markdownDescription": "This option has been deprecated and will be removed from v3 in favor of `ruleSuppressed`.\n\nEnable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules | DEPRECATED", "type": "boolean" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "PSRule options configuration file.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
50252fd382236463e31e5626b37bc1c3547563e9
2022-08-28T04:28:58
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to `Warn`, a warning is generated. When set to `Ignore`, no output will be displayed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is `true`.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
ceec946b0699c3ee079d095b5c648668da14496d
2022-06-18T14:53:15
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is `true`.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, and RunInfo.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, and `RunInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "Default" ], "type": "string" }, { "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "url": { "description": "The URL to the repository.", "markdownDescription": "The URL to the repository.", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
280508e18bc4478a26a75a50f55b6d7c15747e80
2023-11-12T02:16:39
schemas/PSRule-lock.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$schema": "https://json-schema.org/draft-07/schema#", "additionalProperties": false, "description": "A schema for the PSRule lock file.", "properties": { "modules": { "additionalProperties": { "additionalProperties": false, "properties": { "version": { "title": "Version", "type": "string" } }, "required": [ "version" ], "type": "object" }, "title": "Modules", "type": "object" } }, "required": [ "modules" ], "title": "PSRule lock", "type": "object" }
MIT
en
microsoft/PSRule
de58334a37d839d4d8ac79395be70323d97164cb
2022-08-13T05:36:43
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect rule execution.", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is `true`.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "suppressedRuleWarning": { "default": true, "description": "Enable or disable warnings for suppressed rules. The default is `true`.", "markdownDescription": "Enable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules", "type": "boolean" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "${2:'>=1.0.0'}" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en
microsoft/PSRule
7ee897752601f078ccdfeb96a7c44d3dbfe3b16b
2023-03-02T05:11:17
schemas/PSRule-options.schema.json
359
2024-05-27T09:34:56.226398Z
{ "$ref": "#/definitions/options", "$schema": "https://json-schema.org/draft-07/schema#", "definitions": { "binding-option": { "additionalProperties": false, "description": "Configure property/ object binding options.", "properties": { "field": { "additionalProperties": { "description": "A custom field to bind.", "items": { "type": "string" }, "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "type": "array", "uniqueItems": true }, "description": "Custom fields to bind.", "markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "title": "Field", "type": "object" }, "ignoreCase": { "default": true, "description": "Determines if custom binding uses ignores case when matching properties. The default is true.", "markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)", "title": "Ignore case", "type": "boolean" }, "nameSeparator": { "default": "/", "description": "Configures the separator to use for building a qualified name. The default is '/'.", "markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)", "title": "Name separator", "type": "string" }, "preferTargetInfo": { "default": false, "description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.", "markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)", "title": "Prefer target info", "type": "boolean" }, "targetName": { "description": "Specifies one or more property names to bind TargetName to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)", "title": "Bind TargetName", "type": "array", "uniqueItems": true }, "targetType": { "description": "Specifies one or more property names to bind TargetType to.", "items": { "type": "string" }, "markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)", "title": "Bind TargetType", "type": "array", "uniqueItems": true }, "useQualifiedName": { "default": false, "description": "Determines if a qualified TargetName is used. The default is false.", "markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)", "title": "Use qualified name", "type": "boolean" } }, "title": "Object binding", "type": "object" }, "configuration": { "additionalProperties": true, "defaultSnippets": [ { "body": { "${1:Key}": "${2:Value}" }, "label": "Custom configuration value" } ], "description": "A set of key/ value configuration options for rules.", "markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)", "properties": { "AZURE_AKS_CLUSTER_MINIMUM_VERSION": { "default": "1.25.4", "description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.", "markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "AKS cluster minimum version", "type": "string" }, "AZURE_BICEP_CHECK_TOOL": { "default": false, "description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.", "markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Checking Bicep Tool", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_BICEP_FILE_EXPANSION_TIMEOUT": { "default": 5, "description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.", "markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "maximum": 120, "minimum": 1, "title": "Bicep compilation timeout", "type": "integer" }, "AZURE_BICEP_MINIMUM_VERSION": { "default": "0.4.451", "description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.", "markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep Minimum Version", "type": "string" }, "AZURE_DEPLOYMENT": { "additionalProperties": false, "description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "ps-rule-test-deployment", "type": "string" } }, "title": "Deployment properties", "type": "object" }, "AZURE_MANAGEMENT_GROUP": { "additionalProperties": false, "description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "name": { "default": "psrule-test", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "displayName": { "default": "PSRule Test Management Group", "type": "string" } }, "type": "object" } }, "title": "Deployment management group", "type": "object" }, "AZURE_PARAMETER_DEFAULTS": { "description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.", "markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Required parameter defaults", "type": "object" }, "AZURE_PARAMETER_FILE_EXPANSION": { "default": false, "description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.", "markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Parameter file expansion", "type": "boolean" }, "AZURE_PARAMETER_FILE_METADATA_LINK": { "default": false, "description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.", "markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "title": "Bicep source expansion", "type": "boolean" }, "AZURE_RESOURCE_GROUP": { "additionalProperties": false, "description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "location": { "default": "eastus", "type": "string" }, "name": { "default": "ps-rule-test-rg", "type": "string" }, "properties": { "additionalProperties": false, "properties": { "provisioningState": { "default": "Succeeded", "type": "string" } }, "type": "object" }, "tags": { "default": {}, "type": "object" } }, "title": "Deployment resource group", "type": "object" }, "AZURE_SUBSCRIPTION": { "additionalProperties": false, "description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "displayName": { "default": "PSRule Test Subscription", "type": "string" }, "state": { "default": "NotDefined", "type": "string" }, "subscriptionId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment subscription", "type": "object" }, "AZURE_TENANT": { "additionalProperties": false, "description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.", "markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)", "properties": { "countryCode": { "default": "US", "type": "string" }, "displayName": { "default": "PSRule", "type": "string" }, "tenantId": { "default": "ffffffff-ffff-ffff-ffff-ffffffffffff", "type": "string" } }, "title": "Deployment tenant", "type": "object" } }, "title": "Configuration values", "type": "object" }, "convention-option": { "additionalProperties": false, "description": "Options that configure conventions.", "properties": { "include": { "description": "An ordered list of conventions to include.", "items": { "type": "string" }, "title": "Include conventions", "type": "array", "uniqueItems": true } }, "title": "Convention options", "type": "object" }, "execution-option": { "additionalProperties": false, "description": "Options that affect execution.", "markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)", "properties": { "aliasReferenceWarning": { "default": true, "description": "Enable or disable warnings when an alias to a resource is used. The default is true.", "markdownDescription": "Enable or disable warnings when an alias to a resource is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreferencewarning)", "title": "Warn on resource aliases", "type": "boolean" }, "duplicateResourceId": { "default": "Error", "description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By defaut, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By defaut, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)", "title": "Duplicate resource identifiers", "type": "string" }, "inconclusiveWarning": { "default": true, "description": "Enable or disable warnings for inconclusive rules. The default is true.", "markdownDescription": "Enable or disable warnings for inconclusive rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninconclusivewarning)", "title": "Warn on inconclusive rules", "type": "boolean" }, "initialSessionState": { "default": "BuiltIn", "description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.", "enum": [ "BuiltIn", "Minimal" ], "markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)", "title": "Initial Session State", "type": "string" }, "invariantCultureWarning": { "default": true, "description": "Enable or disable warning when invariant culture is used. The default is true.", "markdownDescription": "Enable or disable warning when invariant culture is used. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculturewarning)", "title": "Warn on invariant culture", "type": "boolean" }, "languageMode": { "default": "FullLanguage", "description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.", "enum": [ "FullLanguage", "ConstrainedLanguage" ], "markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)", "title": "Language mode", "type": "string" }, "notProcessedWarning": { "default": true, "description": "Enable or disable warnings for objects that are not processed by any rule. The default is true.", "markdownDescription": "Enable or disable warnings for objects that are not processed by any rule. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionnotprocessedwarning)", "title": "Warn on unprocessed objects", "type": "boolean" }, "ruleExcluded": { "default": "Ignore", "description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexecluded)", "title": "Rule excluded", "type": "string" }, "ruleSuppressed": { "default": "Warn", "description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed. This option replaces suppressedRuleWarning. You do not need to configure both options. If suppressedRuleWarning is configured, it will override ruleSuppressed with Warn or Ignore until removal in PSRule v3.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\nThis option replaces `suppressedRuleWarning`. You do not need to configure both options. If `suppressedRuleWarning` is configured, it will override `ruleSuppressed` with `Warn` or `Ignore` until removal in PSRule v3.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)", "title": "Rule suppressed", "type": "string" }, "suppressedRuleWarning": { "default": true, "deprecated": true, "description": "This option has been deprecated and will be removed from v3 in favor of ruleSuppressed. Enable or disable warnings for suppressed rules. The default is true.", "markdownDescription": "This option has been deprecated and will be removed from v3 in favor of `ruleSuppressed`.\n\nEnable or disable warnings for suppressed rules. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressedrulewarning)", "title": "Warn on suppressed rules | DEPRECATED", "type": "boolean" }, "suppressionGroupExpired": { "default": "Warn", "description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.", "enum": [ "Ignore", "Warn", "Error", "Debug" ], "markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)", "title": "Expired suppression groups", "type": "string" } }, "title": "Execution options", "type": "object" }, "include-option": { "additionalProperties": false, "description": "Options that affect source locations imported for execution.", "properties": { "module": { "description": "Automatically include rules and resources from the specified modules.", "items": { "description": "Automatically include rules and resources from the specified modules.", "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)", "title": "Include module", "type": "array", "uniqueItems": true }, "path": { "description": "Automatically include rules and resources from the specified paths.", "items": { "description": "Automatically include rules and resources from the specified paths.", "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "string" }, "markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)", "title": "Include path", "type": "array", "uniqueItems": true } }, "title": "Include options", "type": "object" }, "input-option": { "additionalProperties": false, "description": "Options that affect how input types are processed.", "markdownDescription": "Options that affect how input types are processed.", "properties": { "format": { "default": "Detect", "description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.", "enum": [ "None", "Yaml", "Json", "Markdown", "PowerShellData", "File", "Detect" ], "markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)", "title": "Input format", "type": "string" }, "ignoreGitPath": { "default": true, "description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)", "title": "Ignore .git path", "type": "boolean" }, "ignoreObjectSource": { "default": false, "description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.", "markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)", "title": "Ignore object source", "type": "boolean" }, "ignoreRepositoryCommon": { "default": true, "description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.", "markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)", "title": "Ignore common files", "type": "boolean" }, "ignoreUnchangedPath": { "default": false, "description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.", "markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)", "title": "Ignore unchanged path", "type": "boolean" }, "objectPath": { "description": "The object path to a property to use instead of the pipeline object.", "markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)", "title": "Object path", "type": "string" }, "pathIgnore": { "description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.", "items": { "type": "string" }, "markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)", "title": "Path ignore", "type": "array", "uniqueItems": true }, "targetType": { "description": "Only process objects that match one of the included types.", "items": { "type": "string" }, "markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)", "title": "Target type", "type": "array", "uniqueItems": true } }, "title": "Input options", "type": "object" }, "logging-option": { "additionalProperties": false, "description": "Options for configuring information logging.", "properties": { "limitDebug": { "description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)", "title": "Scopes for debug messages", "type": "array", "uniqueItems": true }, "limitVerbose": { "description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.", "items": { "type": "string" }, "markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)", "title": "Scopes for verbose messages", "type": "array", "uniqueItems": true }, "ruleFail": { "default": "None", "description": "Log fail outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)", "title": "Report fail to stream", "type": "string" }, "rulePass": { "default": "None", "description": "Log pass outcomes for each rule to a specific informational stream. The default is None.", "enum": [ "None", "Error", "Warning", "Information" ], "markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)", "title": "Report pass to stream", "type": "string" } }, "title": "Logging options", "type": "object" }, "options": { "additionalProperties": false, "properties": { "binding": { "oneOf": [ { "$ref": "#/definitions/binding-option" } ], "type": "object" }, "configuration": { "oneOf": [ { "$ref": "#/definitions/configuration" } ], "type": "object" }, "convention": { "$ref": "#/definitions/convention-option", "type": "object" }, "execution": { "$ref": "#/definitions/execution-option", "type": "object" }, "include": { "$ref": "#/definitions/include-option", "type": "object" }, "input": { "$ref": "#/definitions/input-option", "type": "object" }, "logging": { "oneOf": [ { "$ref": "#/definitions/logging-option" } ], "type": "object" }, "output": { "$ref": "#/definitions/output-option", "type": "object" }, "repository": { "$ref": "#/definitions/repository-option", "type": "object" }, "requires": { "$ref": "#/definitions/requires", "type": "object" }, "rule": { "oneOf": [ { "$ref": "#/definitions/rule-option" } ], "type": "object" }, "suppression": { "oneOf": [ { "$ref": "#/definitions/suppression-option" } ], "type": "object" } } }, "output-option": { "additionalProperties": false, "description": "Options that affect how output is generated.", "properties": { "as": { "default": "Detail", "description": "Determine if detailed or summary results are generated. The default is Detail.", "enum": [ "Detail", "Summary" ], "markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)", "title": "Result type", "type": "string" }, "banner": { "default": "Default", "description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.", "markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)", "oneOf": [ { "enum": [ "None", "Title", "Source", "SupportLinks", "RepositoryInfo", "Default", "Minimal" ], "type": "string" }, { "type": "integer" } ], "title": "Banner format" }, "culture": { "defaultSnippets": [ { "bodyText": [ "en-AU" ], "label": "en-AU" }, { "bodyText": [ "en-US" ], "label": "en-US" }, { "bodyText": [ "en-GB" ], "label": "en-GB" } ], "description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.", "items": { "description": "A culture for generating output.", "minLength": 2, "type": "string" }, "markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)", "title": "Culture", "type": "array", "uniqueItems": true }, "encoding": { "default": "Default", "description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.", "enum": [ "Default", "UTF8", "UTF7", "Unicode", "UTF32", "ASCII" ], "markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)", "title": "Encoding", "type": "string" }, "footer": { "default": "Default", "description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.", "markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)", "oneOf": [ { "enum": [ "None", "RuleCount", "RunInfo", "OutputFile", "Default" ], "type": "string" }, { "minimum": 0, "type": "integer" } ], "title": "Footer format" }, "format": { "default": "None", "description": "The output format to use when returning results. The default is None.", "enum": [ "None", "Yaml", "Json", "Markdown", "NUnit3", "Csv", "Wide", "Sarif" ], "markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)", "title": "Output format", "type": "string" }, "jobSummaryPath": { "description": "The path to a job summary output file.", "markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)", "title": "Job Summary Path", "type": "string" }, "jsonIndent": { "default": 0, "description": "The indentation level for JSON output. The default is 0.", "markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)", "maximum": 4, "minimum": 0, "title": "Output Json Indent", "type": "integer" }, "outcome": { "default": "Processed", "description": "The outcome of rule results to return. The default is Processed.", "enum": [ "None", "Fail", "Pass", "Error", "Processed", "All" ], "markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)", "title": "Output outcome", "type": "string" }, "path": { "description": "The file path location to save results.", "markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)", "title": "Output path", "type": "string" }, "sarifProblemsOnly": { "default": true, "description": "Determines if SARIF output only includes rules with fail or error outcomes. The default is true.", "markdownDescription": "Determines if SARIF output only includes rules with fail or error outcomes. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputsarifproblemsonly)", "title": "SARIF Problems Only", "type": "boolean" }, "style": { "default": "Detect", "description": "The style that results will be presented in. The default is Detect.", "enum": [ "Client", "Plain", "AzurePipelines", "GitHubActions", "VisualStudioCode", "Detect" ], "markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)", "title": "Output Style", "type": "string" } }, "title": "Output options", "type": "object" }, "repository-option": { "additionalProperties": false, "description": "Configures repository options.", "markdownDescription": "Configures repository options.", "properties": { "baseRef": { "description": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system.", "markdownDescription": "Sets the repository base ref used for comparisons of changed files. By default, the base ref is detected from environment vairables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositorybaseref)", "title": "Base Reference", "type": "string" }, "url": { "description": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system.", "markdownDescription": "Sets the repository URL reported in output. By default, the repository URL is detected from environment variables set by the build system. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#repositoryurl)", "title": "Repository URL", "type": "string" } }, "title": "Repository", "type": "object" }, "requires": { "additionalProperties": { "description": "Specifies a module to constrain to a specific version.", "markdownDescription": "Specifies a module to constrain to a specific version. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "pattern": "^(@pre |@prerelease )?(((?:^|~|\\>=|\\>|=|\\<=|\\<)?v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\s|\\s?\\|\\|\\s?)?){1,}$", "title": "Version constraint", "type": "string" }, "defaultSnippets": [ { "body": { "${1:Module}": "'>=${2:1.0.0}'" }, "label": "Version constraint" } ], "description": "Specifies the required version of a module to use.", "markdownDescription": "Specifies the required version of a module to use. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#requires)", "title": "Required modules", "type": "object" }, "resourceName": { "minLength": 3, "type": "string" }, "rule-option": { "additionalProperties": false, "description": "Options that include/ exclude and configure rules.", "properties": { "exclude": { "description": "Specifies rules to exclude by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Specifies rules to exclude by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "title": "Exclude rules", "type": "array", "uniqueItems": true }, "include": { "description": "Optionally filter to rules by name.", "items": { "$ref": "#/definitions/resourceName", "type": "string" }, "markdownDescription": "Optionally filter to rules by name. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "title": "Include rules", "type": "array", "uniqueItems": true }, "includeLocal": { "default": false, "description": "Automatically include all local rules in the search path unless they have been explicitly excluded.", "markdownDescription": "Automatically include all local rules in the search path unless they have been explicitly excluded. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleincludelocal)", "title": "Include local", "type": "boolean" }, "tag": { "additionalProperties": { "oneOf": [ { "description": "A required tag.", "type": "string" }, { "description": "A required tag.", "items": { "type": "string" }, "type": "array", "uniqueItems": true } ] }, "description": "Require rules to have the following tags.", "markdownDescription": "Require rules to have the following tags. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruletag)", "title": "Tags", "type": "object" } }, "title": "Baseline options", "type": "object" }, "suppression-option": { "additionalProperties": { "oneOf": [ { "description": "The name of the rule to suppress.", "items": { "description": "Suppress the rule on TargetNames to suppress.", "markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "string" }, "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppressed rule", "type": "array", "uniqueItems": true }, { "additionalProperties": false, "description": "The name of the rule to suppress.", "markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "properties": { "targetName": { "description": "One or more TargetNames to suppress.", "items": { "type": "string" }, "markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress when", "type": "array", "uniqueItems": true } }, "required": [ "targetName" ], "title": "Suppressed rule", "type": "object" } ] }, "description": "Specifies suppression rules.", "markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)", "title": "Suppress rules", "type": "object", "uniqueItems": true } }, "description": "A schema for PSRule YAML options files.", "title": "PSRule options" }
MIT
en