* Sync PSRule Schema

* Update change log

Co-authored-by: ArmaanMcleod <ArmaanMcleod@users.noreply.github.com>
Co-authored-by: Bernie White <bewhite@microsoft.com>
This commit is contained in:
github-actions[bot] 2023-01-09 12:59:20 +10:00 коммит произвёл GitHub
Родитель 982e0860c8
Коммит 7d0ff36bad
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 366 добавлений и 8 удалений

Просмотреть файл

@ -33,6 +33,8 @@ What's changed since v2.6.0:
- Update snippet versions and links by @BernieWhite
[#955](https://github.com/microsoft/PSRule-vscode/issues/955)
- Engineering:
- Updated PSRule schema files.
[#933](https://github.com/microsoft/PSRule-vscode/pull/933)
- Bump vscode engine to v1.74.0.
[#952](https://github.com/microsoft/PSRule-vscode/pull/952)
- Bump fs-extra to v11.1.0.

Просмотреть файл

@ -30,8 +30,30 @@
"type": "string",
"title": "Name",
"description": "The name of the resource. This must be unique.",
"markdownDescription": "The name of the resource. This must be unique.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/storing-rules/#naming-rules)",
"$ref": "#/definitions/resourceName"
},
"description": {
"type": "string",
"title": "Description",
"description": "A non-localized description of the resource. The description is intended to be a verbose description of the resource. If your resource documentation needs to include background information include it here. For localized documentation define markdown help.",
"markdownDescription": "A non-localized description of the resource.\n\nThe description is intended to be a verbose description of the resource. If your resource documentation needs to include background information include it here.\n\nFor localized documentation define markdown help.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"minLength": 1
},
"displayName": {
"type": "string",
"title": "Display name",
"description": "A non-localized display name for the resource. For localized documentation define markdown help.",
"markdownDescription": "A non-localized display name for the resource. For localized documentation define markdown help.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"minLength": 1
},
"link": {
"type": "string",
"title": "Online help",
"description": "A non-localized URL to documentation for the resource. URLs should be prefixed with https://. Relative URLs are not supported.",
"markdownDescription": "A non-localized URL to documentation for the resource. URLs should be prefixed with `https://`. Relative URLs are not supported.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"pattern": "^https://"
},
"annotations": {
"type": "object",
"title": "Annotations",
@ -60,7 +82,8 @@
},
"required": [
"name"
]
],
"additionalProperties": false
},
"baseline-v1": {
"type": "object",
@ -478,8 +501,8 @@
"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/)",
"description": "A condition made up of one or more expressions that will determine if an object is selected by the selector.",
"markdownDescription": "A condition 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"
}
},
@ -551,6 +574,9 @@
},
"if": {
"type": "object",
"title": "If",
"description": "A condition made up of one or more expressions that will determine if the rule is suppressed.",
"markdownDescription": "A condition 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 is suppressed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_SuppressionGroups/)",
"$ref": "#/definitions/expressions"
}
},
@ -627,6 +653,13 @@
],
"default": "Error"
},
"recommend": {
"type": "string",
"title": "Recommendation",
"description": "A non-localized recommendation for the rule. The recommendation is intended to identify corrective actions that can be taken to address any failures. Avoid using URLs within the recommendation. For localized documentation define markdown help.",
"markdownDescription": "A non-localized recommendation for the rule.\n\nThe recommendation is intended to identify corrective actions that can be taken to address any failures. Avoid using URLs within the recommendation.\n\nFor localized documentation define markdown help.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"minLength": 1
},
"type": {
"type": "array",
"title": "Type pre-condition",
@ -676,8 +709,30 @@
"type": "string",
"title": "Name",
"description": "The name of the resource. This must be unique.",
"markdownDescription": "The name of the resource. This must be unique.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/storing-rules/#naming-rules)",
"$ref": "#/definitions/resourceName"
},
"description": {
"type": "string",
"title": "Description",
"description": "A non-localized description of the resource. The description is intended to be a verbose description of the resource. If your resource documentation needs to include background information include it here. For localized documentation define markdown help.",
"markdownDescription": "A non-localized description of the resource.\n\nThe description is intended to be a verbose description of the resource. If your resource documentation needs to include background information include it here.\n\nFor localized documentation define markdown help.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"minLength": 1
},
"displayName": {
"type": "string",
"title": "Display name",
"description": "A non-localized display name for the resource. For localized documentation define markdown help.",
"markdownDescription": "A non-localized display name for the resource. For localized documentation define markdown help.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"minLength": 1
},
"link": {
"type": "string",
"title": "Online help",
"description": "A non-localized URL to documentation for the resource. URLs should be prefixed with https://. Relative URLs are not supported.",
"markdownDescription": "A non-localized URL to documentation for the resource. URLs should be prefixed with `https://`. Relative URLs are not supported.\n\n[See help](https://microsoft.github.io/PSRule/v2/authoring/writing-rule-help/)",
"pattern": "^https://"
},
"ref": {
"title": "Reference",
"description": "An optional stable opaque identifier of this resource for lookup. This must be unique if set.",
@ -749,7 +804,8 @@
},
"required": [
"name"
]
],
"additionalProperties": false
},
"selectorExpressionValueMultiString": {
"oneOf": [
@ -910,6 +966,9 @@
{
"$ref": "#/definitions/expressions/definitions/conditions/definitions/version"
},
{
"$ref": "#/definitions/expressions/definitions/conditions/definitions/apiVersion"
},
{
"$ref": "#/definitions/expressions/definitions/conditions/definitions/hasDefault"
},
@ -999,6 +1058,9 @@
},
{
"$ref": "#/definitions/expressions/definitions/operands/definitions/source"
},
{
"$ref": "#/definitions/expressions/definitions/operands/definitions/scope"
}
],
"definitions": {
@ -1078,6 +1140,17 @@
"required": [
"source"
]
},
"scope": {
"type": "object",
"properties": {
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
"scope"
]
}
}
},
@ -1151,6 +1224,16 @@
"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": ""
},
"scope": {
"type": "string",
"title": "Scope",
"description": "Any scopes assigned to the object currently being processed by the pipeline.",
"markdownDescription": "Any scopes assigned to the object currently being processed by the pipeline.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#scope)",
"default": ".",
"enum": [
"."
]
}
}
},
@ -1253,6 +1336,9 @@
{
"$ref": "#/definitions/expressions/definitions/conditions/definitions/version"
},
{
"$ref": "#/definitions/expressions/definitions/conditions/definitions/apiVersion"
},
{
"$ref": "#/definitions/expressions/definitions/conditions/definitions/hasDefault"
},
@ -1315,6 +1401,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1407,6 +1496,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1424,12 +1516,15 @@
"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)",
"description": "When set to true, the operand must have a non-empty value. When set to false the operand must be null or empty.",
"markdownDescription": "When set to `true`, the operand must have a non-empty value. When set to `false` the operand must be `null` or empty.\n\n[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"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1465,6 +1560,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1500,6 +1598,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1538,6 +1639,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1576,6 +1680,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1751,6 +1858,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1802,6 +1912,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1853,6 +1966,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1904,6 +2020,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -1954,6 +2073,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -2003,6 +2125,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -2053,6 +2178,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -2102,6 +2230,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -2159,6 +2290,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -2209,6 +2343,9 @@
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
},
"scope": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/scope"
}
},
"required": [
@ -2234,6 +2371,9 @@
"field": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/field"
},
"name": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/name"
},
"value": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/value"
}
@ -2246,7 +2386,8 @@
"$ref": "#/definitions/expressions/definitions/operands"
}
],
"additionalProperties": false
"additionalProperties": false,
"minProperties": 2
},
"isArray": {
"type": "object",
@ -2425,6 +2566,9 @@
"field": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/field"
},
"name": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/name"
},
"value": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/value"
}
@ -2453,6 +2597,9 @@
"field": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/field"
},
"name": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/name"
},
"value": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/value"
}
@ -2553,6 +2700,41 @@
"additionalProperties": false,
"minProperties": 2
},
"apiVersion": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"title": "API Version",
"description": "Must be a valid date version. A constraint can optionally be provided to require the date version to be within a range.",
"markdownDescription": "Must be a valid date version. A constraint can optionally be provided to require the date version to be within a range. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Expressions/#apiversion)",
"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/#apiversion)",
"default": false
},
"field": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/field"
},
"value": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/value"
}
},
"required": [
"apiVersion"
],
"oneOf": [
{
"$ref": "#/definitions/expressions/definitions/properties"
}
],
"additionalProperties": false,
"minProperties": 2
},
"hasDefault": {
"type": "object",
"properties": {
@ -2618,6 +2800,9 @@
},
"value": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/value"
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
}
},
"required": [
@ -2629,7 +2814,7 @@
}
],
"additionalProperties": false,
"maxProperties": 2
"minProperties": 2
},
"notWithinPath": {
"type": "object",
@ -2657,6 +2842,9 @@
},
"value": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/value"
},
"source": {
"$ref": "#/definitions/expressions/definitions/properties/definitions/source"
}
},
"required": [
@ -2902,6 +3090,21 @@
},
{
"$ref": "#/definitions/fn/definitions/function/definitions/configuration"
},
{
"$ref": "#/definitions/fn/definitions/function/definitions/replace"
},
{
"$ref": "#/definitions/fn/definitions/function/definitions/trim"
},
{
"$ref": "#/definitions/fn/definitions/function/definitions/first"
},
{
"$ref": "#/definitions/fn/definitions/function/definitions/last"
},
{
"$ref": "#/definitions/fn/definitions/function/definitions/split"
}
],
"definitions": {
@ -3173,6 +3376,159 @@
"required": [
"configuration"
]
},
"replace": {
"type": "object",
"properties": {
"replace": {
"type": "object",
"title": "Trim",
"description": "The replace function searches for a string and replaces them with a new string.",
"markdownDescription": "The `replace` function searches for a string and replaces them with a new string.",
"$ref": "#/definitions/fn/definitions/function"
},
"oldString": {
"type": "string",
"description": "The string to replace.",
"minLength": 1
},
"newString": {
"type": "string",
"description": "The new string to replace oldString."
},
"caseSensitive": {
"type": "boolean",
"title": "Case-sensitive",
"description": "Determines if the replace is case-sensitive. By default, a case-insensitive comparison is performed.",
"default": false
}
},
"additionalProperties": false,
"required": [
"replace",
"oldString",
"newString"
]
},
"trim": {
"type": "object",
"properties": {
"trim": {
"type": "object",
"title": "Trim",
"description": "Trim a string value by removing leading and trailings whitespace.",
"markdownDescription": "Trim a string value by removing leading and trailings whitespace.",
"$ref": "#/definitions/fn/definitions/function"
}
},
"additionalProperties": false,
"required": [
"trim"
]
},
"first": {
"type": "object",
"properties": {
"first": {
"oneOf": [
{
"type": "array",
"description": "The first function returns the first element in the array.",
"markdownDescription": "The `first` function returns the first element in the array.",
"items": {
"$ref": "#/definitions/fn/definitions/function"
},
"additionalItems": false,
"minItems": 2
},
{
"type": "object",
"description": "The first function returns the first element of arrays or the first character of a string.",
"markdownDescription": "The `first` function returns the first element of arrays or the first character of a string.",
"$ref": "#/definitions/fn/definitions/function"
}
]
}
},
"additionalProperties": false,
"required": [
"first"
]
},
"last": {
"type": "object",
"properties": {
"last": {
"oneOf": [
{
"type": "array",
"description": "The last function returns the last element in the array.",
"markdownDescription": "The `last` function returns the last element in the array.",
"items": {
"$ref": "#/definitions/fn/definitions/function"
},
"additionalItems": false,
"minItems": 2
},
{
"type": "object",
"description": "The last function returns the last element of arrays or the last character of a string.",
"markdownDescription": "The `last` function returns the last element of arrays or the last character of a string.",
"$ref": "#/definitions/fn/definitions/function"
}
]
}
},
"additionalProperties": false,
"required": [
"last"
]
},
"split": {
"type": "object",
"properties": {
"split": {
"oneOf": [
{
"type": "string",
"description": "The split function returns converts a string into an array by spliting based on a delimiter.",
"markdownDescription": "The `split` function returns converts a string into an array by spliting based on a delimiter."
},
{
"type": "object",
"description": "The split function returns converts a string into an array by spliting based on a delimiter.",
"markdownDescription": "The `split` function returns converts a string into an array by spliting based on a delimiter.",
"$ref": "#/definitions/fn/definitions/function"
}
],
"default": {}
},
"delimiter": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"additionalItems": false
}
],
"default": [
""
]
}
},
"additionalProperties": false,
"required": [
"split",
"delimiter"
]
}
}
}