PSRule-language.schema.json
{ "$schema": "https://json-schema.org/draft-07/schema#", "$ref": "#/definitions/resource-v1", "definitions": { "resource-v1": { "oneOf": [ { "$ref": "#/definitions/rule-v1" }, { "$ref": "#/definitions/baseline-v1" }, { "$ref": "#/definitions/moduleConfig-v1" }, { "$ref": "#/definitions/selector-v1" }, { "$ref": "#/definitions/suppressionGroup-v1" } ] }, "resource-metadata": { "type": "object", "title": "Metadata", "description": "Additional information to identify the resource.", "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the resource. This must be unique.", "$ref": "#/definitions/resourceName" }, "annotations": { "type": "object", "title": "Annotations", "description": "Additional annotations for the resource.", "properties": { "obsolete": { "type": "boolean", "title": "Obsolete", "description": "A common annotation that flags the resource as obsolete.", "default": false } }, "additionalProperties": true, "defaultSnippets": [ { "label": "Annotation key/ value", "body": { "${1:Key}": "${2:Value}" } } ] }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ] }, "baseline-v1": { "type": "object", "title": "Baseline", "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": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule Baseline resource.", "markdownDescription": "A PSRule Baseline resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/)", "enum": [ "Baseline" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/baselineSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "additionalProperties": false }, "baselineSpec": { "type": "object", "title": "Spec", "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": { "type": "object", "title": "Rule", "description": "A filter for included or excluded rules.", "properties": { "include": { "type": "array", "title": "Include rules", "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/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleinclude)", "items": { "type": "string", "$ref": "#/definitions/resourceNameReference" }, "uniqueItems": true }, "exclude": { "type": "array", "title": "Exclude rules", "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/v2/concepts/PSRule/en-US/about_PSRule_Options/#ruleexclude)", "items": { "type": "string", "$ref": "#/definitions/resourceNameReference" }, "uniqueItems": true }, "tag": { "type": "object", "title": "Tags", "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)", "additionalProperties": { "oneOf": [ { "type": "string", "description": "A required tag." }, { "type": "array", "description": "A required tag.", "items": { "type": "string" }, "uniqueItems": true } ] } } }, "additionalProperties": false } }, "additionalProperties": false }, "moduleConfig-v1": { "type": "object", "title": "ModuleConfig", "description": "A PSRule ModuleConfig.", "properties": { "apiVersion": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule ModuleConfig resource.", "enum": [ "ModuleConfig" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/moduleConfigSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ], "additionalProperties": false }, "moduleConfigSpec": { "type": "object", "title": "Spec", "description": "A specification for a ModuleConfig.", "properties": { "binding": { "$ref": "#/definitions/binding-option" }, "configuration": { "$ref": "#/definitions/configuration" }, "convention": { "$ref": "#/definitions/convention-option" }, "output": { "type": "object", "title": "Output options", "description": "Options that affect how output is generated.", "properties": { "culture": { "type": "array", "title": "Culture", "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.", "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)", "items": { "type": "string", "description": "A culture for generating output.", "minLength": 2 }, "uniqueItems": true, "defaultSnippets": [ { "label": "en-AU", "bodyText": [ "en-AU" ] }, { "label": "en-US", "bodyText": [ "en-US" ] }, { "label": "en-GB", "bodyText": [ "en-GB" ] } ] } }, "additionalProperties": false }, "rule": { "type": "object", "title": "Rule", "description": "A filter for included or excluded rules.", "properties": { "baseline": { "type": "string", "title": "Baseline", "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)", "$ref": "#/definitions/resourceNameReference" } }, "additionalProperties": false } }, "additionalProperties": false }, "resourceName": { "type": "string", "minLength": 3, "maxLength": 128, "pattern": "^[^<>:/\\\\|?*\"'`+@._\\-\\x00-\\x1F][^<>:/\\\\|?*\"'`+@\\x00-\\x1F]{1,126}[^<>:/\\\\|?*\"'`+@._\\-\\x00-\\x1F]$" }, "resourceNameReference": { "type": "string", "minLength": 3, "pattern": "^.*\\[^<>:/\\\\|?*\"'`+@._\\-\\x00-\\x1F][^<>:/\\\\|?*\"'`+@\\x00-\\x1F]{1,126}[^<>:/\\\\|?*\"'`+@._\\-\\x00-\\x1F]$" }, "resourceTags": { "type": "object", "title": "Tags", "description": "Additional indexed key/ value pairs for the resource.", "additionalProperties": { "type": "string" }, "defaultSnippets": [ { "label": "Tag key/ value", "body": { "${1:Key}": "${2:Value}" } } ] }, "binding-option": { "type": "object", "title": "Object binding", "description": "Configure property/ object binding options.", "properties": { "field": { "type": "object", "title": "Field", "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)", "additionalProperties": { "type": "array", "description": "A custom field to bind.", "markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)", "items": { "type": "string" }, "uniqueItems": true } }, "ignoreCase": { "type": "boolean", "title": "Ignore case", "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)", "default": true }, "nameSeparator": { "type": "string", "title": "Name separator", "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)", "default": "/" }, "preferTargetInfo": { "type": "boolean", "title": "Prefer target info", "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)", "default": false }, "targetName": { "type": "array", "title": "Bind TargetName", "description": "Specifies one or more property names to bind TargetName to.", "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)", "items": { "type": "string" }, "uniqueItems": true }, "targetType": { "type": "array", "title": "Bind TargetType", "description": "Specifies one or more property names to bind TargetType to.", "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)", "items": { "type": "string" }, "uniqueItems": true }, "useQualifiedName": { "type": "boolean", "title": "Use qualified name", "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)", "default": false } }, "additionalProperties": false }, "configuration": { "type": "object", "title": "Configuration values", "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)", "defaultSnippets": [ { "label": "Configuration value", "body": { "${1:Key}": "${2:Value}" } } ] }, "convention-option": { "type": "object", "title": "Convention options", "description": "Options that configure conventions.", "properties": { "include": { "type": "array", "title": "Include conventions", "description": "An ordered list of conventions to include.", "markdownDescription": "An ordered list of conventions to include. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#conventioninclude)", "items": { "type": "string" }, "uniqueItems": true } }, "additionalProperties": false }, "selector-v1": { "type": "object", "title": "Selector", "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": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule Selector resource.", "enum": [ "Selector" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/selectorSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ] }, "selectorSpec": { "type": "object", "title": "Spec", "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": { "type": "object", "title": "If", "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/)", "$ref": "#/definitions/expressions" } }, "required": [ "if" ], "additionalProperties": false }, "suppressionGroup-v1": { "type": "object", "title": "SuppressionGroup", "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": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A PSRule SuppressionGroup resource.", "enum": [ "SuppressionGroup" ] }, "metadata": { "type": "object", "$ref": "#/definitions/resource-metadata" }, "spec": { "type": "object", "$ref": "#/definitions/suppressionGroupSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ] }, "suppressionGroupSpec": { "type": "object", "title": "Spec", "description": "PSRule Suppression Group specification.", "properties": { "rule": { "type": "array", "title": "Rule pre-condition", "description": "This only applies to rules that match the specified rule names", "items": { "type": "string" }, "uniqueItems": true }, "if": { "type": "object", "$ref": "#/definitions/expressions" } }, "required": [ "if" ], "additionalProperties": false }, "rule-v1": { "type": "object", "title": "Rule", "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": { "type": "string", "title": "API Version", "description": "The API Version for the PSRule resources.", "enum": [ "github.com/microsoft/PSRule/v1" ] }, "kind": { "type": "string", "title": "Kind", "description": "A rule resource.", "markdownDescription": "A rule resource. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Rules/)", "enum": [ "Rule" ] }, "metadata": { "type": "object", "$ref": "#/definitions/ruleMetadata" }, "spec": { "type": "object", "$ref": "#/definitions/ruleSpec" } }, "required": [ "apiVersion", "kind", "metadata", "spec" ] }, "ruleSpec": { "type": "object", "title": "Spec", "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": { "type": "object", "title": "Condition", "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.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rules/)", "oneOf": [ { "$ref": "#/definitions/expressions" } ] }, "level": { "type": "string", "title": "Level", "description": "If the rule fails, how serious is the result. By default this is set to Error.", "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/)", "enum": [ "Error", "Warning", "Information" ], "default": "Error" }, "type": { "type": "array", "title": "Type pre-condition", "description": "This rule only applies to objects that match the specifies types.", "items": { "type": "string", "default": "" }, "uniqueItems": true }, "with": { "type": "array", "title": "Selector pre-condition", "description": "This rule only applies to objects that match the specified selectors.", "items": { "type": "string", "default": "" }, "uniqueItems": true }, "where": { "type": "object", "title": "Sub-selector pre-condition", "description": "The rule only applies to objects that match the sub-selector condition.", "markdownDescription": "The rule only applies to objects that match the sub-selector condition.\n\n[See help](https://microsoft.github.io/PSRule/v2/expressions/sub-selectors/)", "oneOf": [ { "$ref": "#/definitions/expressions" } ] } }, "required": [ "condition" ], "additionalProperties": false, "default": { "condition": {} } }, "ruleMetadata": { "type": "object", "title": "Metadata", "description": "Additional information to identify the resource.", "properties": { "name": { "type": "string", "title": "Name", "description": "The name of the resource. This must be unique.", "$ref": "#/definitions/resourceName" }, "ref": { "title": "Reference", "description": "An optional stable opaque identifier of this resource for lookup. This must be unique if set.", "$ref": "#/definitions/resourceName" }, "annotations": { "type": "object", "title": "Annotations", "description": "Additional annotations for the resource.", "additionalProperties": true, "defaultSnippets": [ { "label": "Annotation key/ value", "body": { "${1:Key}": "${2:Value}" } } ] }, "alias": { "type": "array", "title": "Aliases", "description": "Alternative names this resource is known by.", "items": { "type": "string", "title": "Alias", "description": "An alternative name.", "$ref": "#/definitions/resourceName" }, "uniqueItems": true }, "tags": { "$ref": "#/definitions/resourceTags" } }, "required": [ "name" ] }, "selectorExpressionValueMultiString": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "uniqueItems": true } ] }, "selectorExpressionValue": { "oneOf": [ { "type": "string", "ztitle": "Value from string", "zdescription": "A value to compare.", "default": "" }, { "type": "boolean", "ztitle": "Value from boolean", "zdescription": "A value to compare.", "default": true }, { "type": "integer", "ztitle": "Value from integer", "zdescription": "A value to compare.", "default": 0 }, { "type": "object", "ztitle": "Value for object", "zdescription": "A value to compare.", "not": { "propertyNames": { "enum": [ "$" ] } } }, { "$ref": "#/definitions/fn" } ] }, "expressions": { "type": "object", "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operators/definitions/allOf" }, { "$ref": "#/definitions/expressions/definitions/operators/definitions/anyOf" }, { "$ref": "#/definitions/expressions/definitions/operators/definitions/not" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/exists" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/equals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notEquals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/hasValue" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/match" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notMatch" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/in" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notIn" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/setOf" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/subset" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/count" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notCount" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/less" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/lessOrEquals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/greater" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/greaterOrEquals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/startsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notStartsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/endsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notEndsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/contains" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notContains" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isString" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isLower" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isArray" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isBoolean" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isDateTime" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isInteger" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isNumeric" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isUpper" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/hasSchema" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/version" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/hasDefault" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/withinPath" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notWithinPath" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/like" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notLike" } ], "defaultSnippets": [ { "label": "field", "description": "The object path of a field to compare.", "markdownDescription": "The object path of a field to compare.", "body": { "field": "${1}" } }, { "label": "value", "body": { "value": "${1}" } }, { "label": "name", "body": { "name": "." } }, { "label": "type", "body": { "type": "." } }, { "label": "source", "body": { "source": "${1}" } }, { "label": "allOf", "body": { "allOf": [ "${1}" ] } }, { "label": "anyOf", "body": { "anyOf": [ "${1}" ] } }, { "label": "not", "body": { "not": {} } } ], "definitions": { "operands": { "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands/definitions/field" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/value" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/type" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/name" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/source" } ], "definitions": { "string-only": { "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands/definitions/field" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/value" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/type" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/name" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/source" } ] }, "field": { "type": "object", "properties": { "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "where": { "$ref": "#/definitions/expressions/definitions/properties/definitions/where" } }, "required": [ "field" ] }, "value": { "type": "object", "properties": { "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "value" ] }, "type": { "type": "object", "properties": { "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" } }, "required": [ "type" ] }, "name": { "type": "object", "properties": { "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" } }, "required": [ "name" ] }, "source": { "type": "object", "properties": { "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "source" ] } } }, "properties": { "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands/definitions/field" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/value" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/name" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/type" }, { "$ref": "#/definitions/expressions/definitions/operands/definitions/source" } ], "definitions": { "field": { "type": "string", "title": "Field", "description": "The object path of a field to compare.", "markdownDescription": "The object path of a field to compare.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#field)", "minLength": 1 }, "where": { "type": "object", "title": "Sub-selector filter", "description": "Limits the condition to matching items.", "markdownDescription": "Limits the condition to matching items.\n\n[See help](https://microsoft.github.io/PSRule/v2/expressions/sub-selectors/)", "allOf": [ { "$ref": "#/definitions/expressions" } ] }, "value": { "allOf": [ { "$ref": "#/definitions/selectorExpressionValue" } ] }, "name": { "type": "string", "title": "Name", "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)", "default": ".", "enum": [ "." ] }, "type": { "type": "string", "title": "Type", "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)", "default": ".", "enum": [ "." ] }, "source": { "type": "string", "title": "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)", "default": "" } } }, "conditions": { "type": "object", "oneOf": [ { "$ref": "#/definitions/expressions/definitions/conditions/definitions/exists" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/equals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notEquals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/hasValue" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/match" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notMatch" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/in" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notIn" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/setOf" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/subset" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/count" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notCount" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/less" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/lessOrEquals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/greater" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/greaterOrEquals" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/startsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notStartsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/endsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notEndsWith" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/contains" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notContains" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isString" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isLower" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isArray" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isBoolean" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isDateTime" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isInteger" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isNumeric" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/isUpper" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/hasSchema" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/version" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/hasDefault" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/withinPath" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notWithinPath" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/like" }, { "$ref": "#/definitions/expressions/definitions/conditions/definitions/notLike" } ], "definitions": { "equals": { "type": "object", "title": "equals", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "properties": { "equals": { "title": "Equals", "description": "Must have the specified value.", "markdownDescription": "Must have the specified value.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "default": "", "oneOf": [ { "$ref": "#/definitions/selectorExpressionValue" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "description": "Convert type of compared operand.", "markdownDescription": "Convert type of compared operand.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#equals)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "equals" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "count": { "type": "object", "properties": { "count": { "type": "integer", "title": "Count", "description": "Must include the specified number of values.", "markdownDescription": "Must include the specified number of values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#count)", "minimum": 0 } }, "required": [ "count" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "exists": { "type": "object", "properties": { "exists": { "type": "boolean", "title": "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)", "default": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" } }, "required": [ "exists", "field" ] }, "notEquals": { "type": "object", "properties": { "notEquals": { "title": "Not Equals", "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)", "default": "", "oneOf": [ { "$ref": "#/definitions/selectorExpressionValue" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "notEquals" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "hasValue": { "type": "object", "properties": { "hasValue": { "type": "boolean", "title": "Has Value", "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)", "default": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" } }, "required": [ "hasValue" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "match": { "type": "object", "properties": { "match": { "type": "string", "title": "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)", "default": "" }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "match" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "notMatch": { "type": "object", "properties": { "notMatch": { "type": "string", "title": "Not Match", "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)", "default": "" }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "notMatch" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "in": { "type": "object", "properties": { "in": { "type": "array", "title": "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)", "default": [ "" ], "uniqueItems": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "in" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "notIn": { "type": "object", "properties": { "notIn": { "type": "array", "title": "Not In", "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)", "default": [ "" ], "uniqueItems": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "notIn" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ] }, "setOf": { "type": "object", "properties": { "setOf": { "type": "array", "title": "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)", "default": [ "" ], "uniqueItems": true }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "setOf" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/properties" } ] }, "subset": { "type": "object", "properties": { "subset": { "type": "array", "title": "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)", "default": [ "" ], "uniqueItems": true }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "unique": { "type": "boolean", "title": "Unique", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "subset" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/properties" } ] }, "notCount": { "type": "object", "properties": { "notCount": { "type": "integer", "title": "NotCount", "description": "Determines if operand does not have number of items.", "markdownDescription": "Determines if operand does not have number of items. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notcount)", "minimum": 0, "default": 0 }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "notCount" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/properties" } ], "additionalProperties": false }, "less": { "type": "object", "properties": { "less": { "title": "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)", "default": 0, "oneOf": [ { "type": "integer" }, { "type": "object", "$ref": "#/definitions/fn" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "less" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "lessOrEquals": { "type": "object", "properties": { "lessOrEquals": { "title": "Less or Equal to", "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)", "default": 0, "oneOf": [ { "type": "integer" }, { "type": "object", "$ref": "#/definitions/fn" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "lessOrEquals" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "greater": { "type": "object", "properties": { "greater": { "title": "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)", "default": 0, "oneOf": [ { "type": "integer" }, { "type": "object", "$ref": "#/definitions/fn" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "greater" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "greaterOrEquals": { "type": "object", "properties": { "greaterOrEquals": { "title": "Greater or Equal to", "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)", "default": 0, "oneOf": [ { "type": "integer" }, { "type": "object", "$ref": "#/definitions/fn" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "greaterOrEquals" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "startsWith": { "type": "object", "properties": { "startsWith": { "title": "Starts with", "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)", "$ref": "#/definitions/selectorExpressionValueMultiString", "default": "" }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "startsWith" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "notStartsWith": { "type": "object", "properties": { "notStartsWith": { "title": "Not starts with", "description": "Must not start with any of the specified values.", "markdownDescription": "Must not start with any of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notstartswith)", "$ref": "#/definitions/selectorExpressionValueMultiString" }, "convert": { "type": "boolean", "title": "Type conversion", "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/#notstartswith)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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/#notstartswith)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "notStartsWith" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "endsWith": { "type": "object", "properties": { "endsWith": { "title": "Ends with", "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)", "$ref": "#/definitions/selectorExpressionValueMultiString", "default": "" }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "endsWith" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "notEndsWith": { "type": "object", "properties": { "notEndsWith": { "title": "Not Ends with", "description": "Must not end with any of the specified values.", "markdownDescription": "Must not end with any of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notendswith)", "$ref": "#/definitions/selectorExpressionValueMultiString" }, "convert": { "type": "boolean", "title": "Type conversion", "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/#notendswith)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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/#notendswith)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "notEndsWith" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "contains": { "type": "object", "title": "contains", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "properties": { "contains": { "title": "Contains", "description": "Must contain one of the specified values.", "markdownDescription": "Must contain one of the specified values.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#contains)", "default": "", "allOf": [ { "$ref": "#/definitions/selectorExpressionValueMultiString" } ] }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "contains" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 }, "notContains": { "type": "object", "properties": { "notContains": { "title": "Not Contains", "description": "Must not contain any of the specified values.", "markdownDescription": "Must not contain any of the specified values. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notcontains)", "$ref": "#/definitions/selectorExpressionValueMultiString" }, "convert": { "type": "boolean", "title": "Type conversion", "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/#notcontains)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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/#notcontains)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" }, "type": { "$ref": "#/definitions/expressions/definitions/properties/definitions/type" }, "name": { "$ref": "#/definitions/expressions/definitions/properties/definitions/name" }, "source": { "$ref": "#/definitions/expressions/definitions/properties/definitions/source" } }, "required": [ "notContains" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "isString": { "type": "object", "properties": { "isString": { "type": "boolean", "title": "Is string", "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)", "default": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isString" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "isArray": { "type": "object", "properties": { "isArray": { "type": "boolean", "title": "Is array", "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)", "default": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isArray" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "isBoolean": { "type": "object", "properties": { "isBoolean": { "type": "boolean", "title": "Is boolean", "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)", "default": true }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isBoolean" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "isDateTime": { "type": "object", "properties": { "isDateTime": { "type": "boolean", "title": "Is datetime", "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)", "default": true }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isDateTime" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "isInteger": { "type": "object", "properties": { "isInteger": { "type": "boolean", "title": "Is integer", "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)", "default": true }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isInteger" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false }, "isNumeric": { "type": "object", "properties": { "isNumeric": { "type": "boolean", "title": "Is numeric", "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)", "default": true }, "convert": { "type": "boolean", "title": "Type conversion", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isNumeric" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 }, "isLower": { "type": "object", "properties": { "isLower": { "type": "boolean", "title": "Is Lowercase", "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)", "default": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isLower" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 }, "isUpper": { "type": "object", "properties": { "isUpper": { "type": "boolean", "title": "Is Uppercase", "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)", "default": true }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "isUpper" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 }, "hasSchema": { "type": "object", "properties": { "hasSchema": { "type": "array", "title": "Has schema", "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)", "default": [], "items": { "type": "string", "title": "Has schema", "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 }, "uniqueItems": true }, "ignoreScheme": { "type": "boolean", "title": "Ignore scheme", "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)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "hasSchema" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/properties" } ], "additionalProperties": false, "minProperties": 2 }, "version": { "type": "object", "properties": { "version": { "type": "string", "title": "Version", "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)", "default": "" }, "includePrerelease": { "type": "boolean", "title": "Include pre-release", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "version" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/properties" } ], "additionalProperties": false, "minProperties": 2 }, "hasDefault": { "type": "object", "properties": { "hasDefault": { "title": "Has Default", "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)", "default": "", "oneOf": [ { "$ref": "#/definitions/selectorExpressionValue" } ] }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "hasDefault" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/properties" } ], "additionalProperties": false, "minProperties": 2 }, "withinPath": { "type": "object", "properties": { "withinPath": { "type": "array", "title": "Within Path", "description": "The file path must exist within the required paths.", "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)", "default": [], "items": { "type": "string" }, "uniqueItems": true }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "withinPath" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "maxProperties": 2 }, "notWithinPath": { "type": "object", "properties": { "notWithinPath": { "type": "array", "title": "Not Within Path", "description": "The file path must not exist within the required paths.", "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)", "default": [], "items": { "type": "string" }, "uniqueItems": true }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "notWithinPath" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 }, "like": { "type": "object", "properties": { "like": { "title": "Like", "description": "Must match any of the specified wildcard patterns.", "markdownDescription": "Must match any of the specified wildcard patterns. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#like)", "$ref": "#/definitions/selectorExpressionValueMultiString" }, "convert": { "type": "boolean", "title": "Type conversion", "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/#like)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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/#like)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "like" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 }, "notLike": { "type": "object", "properties": { "notLike": { "title": "Not like", "description": "Must not match any of the specified wildcard patterns.", "markdownDescription": "Must not match any of the specified wildcard patterns. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#notlike)", "$ref": "#/definitions/selectorExpressionValueMultiString" }, "convert": { "type": "boolean", "title": "Type conversion", "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/#notlike)", "default": false }, "caseSensitive": { "type": "boolean", "title": "Case sensitive", "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/#notlike)", "default": false }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "value": { "$ref": "#/definitions/expressions/definitions/properties/definitions/value" } }, "required": [ "notLike" ], "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operands" } ], "additionalProperties": false, "minProperties": 2 } } }, "operators": { "type": "object", "oneOf": [ { "$ref": "#/definitions/expressions/definitions/operators/definitions/allOf" }, { "$ref": "#/definitions/expressions/definitions/operators/definitions/anyOf" }, { "$ref": "#/definitions/expressions/definitions/operators/definitions/not" } ], "definitions": { "allOf": { "type": "object", "title": "allOf", "description": "All of the expressions must be true.", "markdownDescription": "All of the expressions must be true.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#allof)", "properties": { "allOf": { "type": "array", "title": "AllOf", "description": "All of the expressions must be true.", "markdownDescription": "All of the expressions must be true.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#allof)", "items": { "$ref": "#/definitions/expressions" } }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "where": { "$ref": "#/definitions/expressions/definitions/properties/definitions/where" } }, "required": [ "allOf" ], "oneOf": [ { "properties": { "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "where": { "$ref": "#/definitions/expressions/definitions/properties/definitions/where" } } } ], "additionalProperties": false }, "anyOf": { "type": "object", "properties": { "anyOf": { "type": "array", "title": "AnyOf", "description": "One of the expressions must be true.", "markdownDescription": "All of the expressions must be true.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#anyof)", "items": { "$ref": "#/definitions/expressions" } }, "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "where": { "$ref": "#/definitions/expressions/definitions/properties/definitions/where" } }, "required": [ "anyOf" ], "oneOf": [ { "properties": { "field": { "$ref": "#/definitions/expressions/definitions/properties/definitions/field" }, "where": { "$ref": "#/definitions/expressions/definitions/properties/definitions/where" } } } ], "additionalProperties": false }, "not": { "type": "object", "properties": { "not": { "type": "object", "title": "Not", "description": "The nested expression must not be true.", "markdownDescription": "The nested expression must not be true.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#not)", "$ref": "#/definitions/expressions" } }, "required": [ "not" ], "additionalProperties": false } } } } }, "fn": { "ztitle": "Value from function", "zdescription": "A function expression that once evaluated specifies the value.", "zmarkdownDescription": "A function expression that once evaluated specifies the value.", "properties": { "$": { "type": "object", "title": "Value from function", "description": "A function expression that once evaluated specifies the value.", "markdownDescription": "A function expression that once evaluated specifies the value.", "$ref": "#/definitions/fn/definitions/function" } }, "required": [ "$" ], "definitions": { "function": { "oneOf": [ { "$ref": "#/definitions/fn/definitions/function/definitions/substring" }, { "$ref": "#/definitions/fn/definitions/function/definitions/string" }, { "$ref": "#/definitions/fn/definitions/function/definitions/boolean" }, { "$ref": "#/definitions/fn/definitions/function/definitions/integer" }, { "$ref": "#/definitions/fn/definitions/function/definitions/concat" }, { "$ref": "#/definitions/fn/definitions/function/definitions/path" }, { "$ref": "#/definitions/fn/definitions/function/definitions/configuration" } ], "definitions": { "equal": { "type": "object", "properties": { "equal": { "type": "array", "title": "Equal", "description": "The equal operator checks for equity between two operands.", "markdownDescription": "The `equal` operator checks for equity two operands.", "items": { "oneOf": [ { "$ref": "#/definitions/fn/definitions/function" }, { "type": "string" }, { "type": "integer" }, { "type": "boolean" } ] }, "additionalItems": false, "minItems": 2, "maxItems": 2 } }, "additionalProperties": false, "required": [ "equal" ] }, "substring": { "type": "object", "properties": { "substring": { "title": "Substring", "description": "The substring function, copies a number of characters from input starting from a zero based position.", "markdownDescription": "The `substring` function, copies a number of characters from input starting from a zero based position.", "oneOf": [ { "type": "string" }, { "type": "object", "$ref": "#/definitions/fn/definitions/function", "defaultSnippets": [ { "label": "From string", "description": "Set value to a specific value.", "body": "" }, { "label": "From configuration", "description": "Configure length from configuration.", "body": { "configuration": "${1}" } } ] } ] }, "start": { "title": "Start", "description": "The zero based position to start copying characters from.", "default": 0, "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "object", "$ref": "#/definitions/fn/definitions/function" } ], "defaultSnippets": [ { "label": "From integer", "description": "Set start to a specific value.", "body": 0 }, { "label": "From configuration", "description": "Configure start from configuration.", "body": { "configuration": "${1}" } } ] }, "length": { "title": "Length", "description": "The number of character to copy from the source string.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "object", "$ref": "#/definitions/fn/definitions/function" } ], "defaultSnippets": [ { "label": "From integer", "description": "Set length to a specific value.", "body": 0 }, { "label": "From configuration", "description": "Configure length from configuration.", "body": { "configuration": "${1}" } } ] } }, "additionalProperties": false, "required": [ "substring" ], "defaultSnippets": [ { "label": "Substring from string", "description": "Set value to a specific value.", "body": { "substring": "${1}", "length": "${2}" } }, { "label": "Substring from configuration", "description": "Configure length from configuration.", "body": { "substring": { "configuration": "${1}" }, "length": "${2}" } } ] }, "string": { "type": "object", "properties": { "string": { "title": "String", "oneOf": [ { "type": "string", "description": "A literal string value." }, { "type": "object", "description": "Converts the operand in to a string value.", "$ref": "#/definitions/fn/definitions/function" } ] } }, "additionalProperties": false, "required": [ "string" ] }, "integer": { "type": "object", "properties": { "integer": { "title": "Integer", "oneOf": [ { "type": "integer", "description": "A literal integer value." }, { "type": "object", "description": "Converts the operand in to an integer.", "$ref": "#/definitions/fn/definitions/function" } ] } }, "additionalProperties": false, "required": [ "integer" ] }, "boolean": { "type": "object", "properties": { "boolean": { "title": "Boolean", "oneOf": [ { "type": "boolean", "description": "A literal boolean value.", "markdownDescription": "A literal boolean value." }, { "type": "object", "description": "Converts the operand to a boolean value.", "markdownDescription": "Converts the operand to a boolean value.", "$ref": "#/definitions/fn/definitions/function" } ] } }, "additionalProperties": false, "required": [ "boolean" ] }, "concat": { "type": "object", "properties": { "concat": { "type": "array", "description": "The concat function combines two or more operands.", "markdownDescription": "The `concat` function combines two or more operands.", "items": { "$ref": "#/definitions/fn/definitions/function" }, "additionalItems": false, "minItems": 2 } }, "additionalProperties": false, "required": [ "concat" ] }, "path": { "type": "object", "properties": { "path": { "type": "string", "title": "Path", "description": "The path function returns a value from an object path.", "markdownDescription": "The `path` function returns a value from an object path." } }, "additionalProperties": false, "required": [ "path" ] }, "configuration": { "type": "object", "properties": { "configuration": { "type": "string", "title": "Configuration", "description": "The configuration function returns a value retrieved from configuration by name.", "markdownDescription": "The `configuration` function returns a value retrieved from configuration by name.", "minLength": 1 } }, "additionalProperties": false, "required": [ "configuration" ] } } } } } } } |