From 2670754283bb1a05a20f50085fb047b38122bc3a Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Tue, 14 Sep 2021 16:50:41 -0700 Subject: [PATCH 1/9] Adding the schema for uiFormDefinition. A uiFormDefinition lets you customize the UI in the Azure portal when deploying an ARM template using the custom deployment blade --- .../2021-09-09/uiFormDefinition.schema.json | 3931 +++++++++++++++++ 1 file changed, 3931 insertions(+) create mode 100644 schemas/2021-09-09/uiFormDefinition.schema.json diff --git a/schemas/2021-09-09/uiFormDefinition.schema.json b/schemas/2021-09-09/uiFormDefinition.schema.json new file mode 100644 index 0000000000..fdb07f3f78 --- /dev/null +++ b/schemas/2021-09-09/uiFormDefinition.schema.json @@ -0,0 +1,3931 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "createFormViewType": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "Form" + ] + }, + "properties": { + "type": "object", + "properties": { + "title": { + "$ref": "#/definitions/stringResource" + }, + "steps": { + "$ref": "#/definitions/formSteps" + } + }, + "additionalProperties": false, + "required": [ + "title", + "steps" + ] + }, + "outputs": { + "$ref": "#/definitions/formDeploymentContext" + } + }, + "required": [ + "properties" + ], + "additionalProperties": false + }, + "formDeploymentContext": { + "oneOf": [ + { + "$ref": "#/definitions/resourceGroupScopeDeploymentContext" + }, + { + "$ref": "#/definitions/subscriptionScopeDeploymentContext" + }, + { + "$ref": "#/definitions/managementGroupScopeDeploymentContext" + }, + { + "$ref": "#/definitions/tenantScopeDeploymentContext" + } + ], + "defaultSnippets": [ + { + "label": "ResourceGroupScopeDeploymentContext", + "description": "Default snippet for deployment context to resource group scope", + "body": { + "kind": "ResourceGroup", + "resourceGroupId": "", + "location": "", + "parameters": {} + } + }, + { + "label": "SubscriptionScopeDeploymentContext", + "description": "Default snippet for deployment context to subscription scope", + "body": { + "kind": "Subscription", + "subscriptionId": "", + "location": "", + "parameters": {} + } + }, + { + "label": "ManagementGroupScopeDeploymentContext", + "description": "Default snippet for deployment context to management group scope", + "body": { + "kind": "ManagementGroup", + "managementGroupId": "", + "location": "", + "parameters": {} + } + }, + { + "label": "TenantScopeDeploymentContext", + "description": "Default snippet for deployment context to tenant scope", + "body": { + "kind": "Tenant", + "location": "", + "parameters": {} + } + } + ] + }, + "resourceGroupScopeDeploymentContext": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "ResourceGroup" + ] + }, + "resourceGroupId": { + "type": "string" + }, + "location": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "kind", + "resourceGroupId", + "location", + "parameters" + ] + }, + "subscriptionScopeDeploymentContext": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "Subscription" + ] + }, + "subscriptionId": { + "type": "string" + }, + "location": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "kind", + "subscriptionId", + "location", + "parameters" + ] + }, + "managementGroupScopeDeploymentContext": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "ManagementGroup" + ] + }, + "managementGroupId": { + "type": "string" + }, + "location": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "kind", + "managementGroupId", + "location", + "parameters" + ] + }, + "tenantScopeDeploymentContext": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "Tenant" + ] + }, + "location": { + "type": "string" + }, + "parameters": { + "type": "object", + "additionalProperties": true + } + }, + "additionalProperties": false, + "required": [ + "kind", + "location", + "parameters" + ] + }, + "stringResource": { + "oneOf": [ + { + "type": "object", + "properties": { + "property": { + "type": "string" + }, + "module": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "property" + ] + }, + { + "type": "string" + } + ] + }, + "formSteps": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/formStep" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + }, + { + "$ref": "#/definitions/formStepWithoutResourceScope" + } + ], + "additionalItems": { + "$ref": "#/definitions/formStepWithoutResourceScope" + } + }, + "formStep": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "description": { + "$ref": "#/definitions/stringResource" + }, + "elements": { + "type": "array", + "items": [ + { + "$ref": "#/definitions/formControls" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + }, + { + "$ref": "#/definitions/formControlsWithoutResourceScope" + } + ], + "additionalItems": { + "$ref": "#/definitions/formControlsWithoutResourceScope" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "label", + "elements" + ] + }, + "formControls": { + "oneOf": [ + { + "$ref": "#/definitions/Microsoft.Common.CheckBox" + }, + { + "$ref": "#/definitions/Microsoft.Common.DropDown" + }, + { + "$ref": "#/definitions/Microsoft.Common.EditableGrid" + }, + { + "$ref": "#/definitions/Microsoft.Common.Grid" + }, + { + "$ref": "#/definitions/Microsoft.Common.FileUpload" + }, + { + "$ref": "#/definitions/Microsoft.Common.InfoBox" + }, + { + "$ref": "#/definitions/Microsoft.Common.OptionsGroup" + }, + { + "$ref": "#/definitions/Microsoft.Common.PasswordBox" + }, + { + "$ref": "#/definitions/Microsoft.Common.ResourceScope" + }, + { + "$ref": "#/definitions/Microsoft.Common.Section" + }, + { + "$ref": "#/definitions/Microsoft.Common.Selector" + }, + { + "$ref": "#/definitions/Microsoft.Common.Slider" + }, + { + "$ref": "#/definitions/Microsoft.Common.TagsByResource" + }, + { + "$ref": "#/definitions/Microsoft.Common.TextBlock" + }, + { + "$ref": "#/definitions/Microsoft.Common.TextBox" + }, + { + "$ref": "#/definitions/Microsoft.Compute.CredentialsCombo-Linux" + }, + { + "$ref": "#/definitions/Microsoft.Compute.CredentialsCombo-Windows" + }, + { + "$ref": "#/definitions/Microsoft.Compute.SizeSelector" + }, + { + "$ref": "#/definitions/Microsoft.Compute.UserNameTextBox" + }, + { + "$ref": "#/definitions/Microsoft.KeyVault.KeyVaultCertificateSelector" + }, + { + "$ref": "#/definitions/Microsoft.ManagedIdentity.IdentitySelector" + }, + { + "$ref": "#/definitions/Microsoft.Network.PublicIpAddressCombo" + }, + { + "$ref": "#/definitions/Microsoft.Network.VirtualNetworkCombo" + }, + { + "$ref": "#/definitions/Microsoft.Solutions.ArmApiControl" + }, + { + "$ref": "#/definitions/Microsoft.Solutions.ResourceSelector" + }, + { + "$ref": "#/definitions/Microsoft.Storage.MultiStorageAccountCombo" + }, + { + "$ref": "#/definitions/Microsoft.Storage.StorageAccountSelector" + }, + { + "$ref": "#/definitions/Microsoft.Storage.StorageBlobSelector" + }, + { + "$ref": "#/definitions/Microsoft.Common.ServicePrincipalSelector" + }, + { + "$ref": "#/definitions/Microsoft.Solutions.GraphApiControl" + }, + { + "$ref": "#/definitions/Microsoft.Common.TenantSelector" + }, + { + "$ref": "#/definitions/Microsoft.Common.ManagementGroupSelector" + }, + { + "$ref": "#/definitions/Microsoft.Common.SubscriptionSelector" + }, + { + "$ref": "#/definitions/Microsoft.Common.ResourceGroupSelector" + }, + { + "$ref": "#/definitions/Microsoft.Common.LocationSelector" + }, + { + "$ref": "#/definitions/Microsoft.Solutions.BladeInvokeControl" + } + ], + "defaultSnippets": [ + { + "label": "Microsoft.Common.CheckBox", + "description": "Default snippet for Microsoft.Common.CheckBox", + "body": { + "type": "Microsoft.Common.CheckBox" + } + }, + { + "label": "Microsoft.Common.DropDown", + "description": "Default snippet for Microsoft.Common.DropDown", + "body": { + "type": "Microsoft.Common.DropDown" + } + }, + { + "label": "Microsoft.Common.EditableGrid", + "description": "Default snippet for Microsoft.Common.EditableGrid", + "body": { + "type": "Microsoft.Common.EditableGrid" + } + }, + { + "label": "Microsoft.Common.Grid", + "description": "Default snippet for Microsoft.Common.Grid", + "body": { + "type": "Microsoft.Common.Grid" + } + }, + { + "label": "Microsoft.Common.FileUpload", + "description": "Default snippet for Microsoft.Common.FileUpload", + "body": { + "type": "Microsoft.Common.FileUpload" + } + }, + { + "label": "Microsoft.Common.InfoBox", + "description": "Default snippet for Microsoft.Common.InfoBox", + "body": { + "type": "Microsoft.Common.InfoBox" + } + }, + { + "label": "Microsoft.Common.OptionsGroup", + "description": "Default snippet for Microsoft.Common.OptionsGroup", + "body": { + "type": "Microsoft.Common.OptionsGroup" + } + }, + { + "label": "Microsoft.Common.PasswordBox", + "description": "Default snippet for Microsoft.Common.PasswordBox", + "body": { + "type": "Microsoft.Common.PasswordBox" + } + }, + { + "label": "Microsoft.Common.ResourceScope", + "description": "Default snippet for Microsoft.Common.ResourceScope", + "body": { + "type": "Microsoft.Common.ResourceScope" + } + }, + { + "label": "Microsoft.Common.Section", + "description": "Default snippet for Microsoft.Common.Section", + "body": { + "type": "Microsoft.Common.Section" + } + }, + { + "label": "Microsoft.Common.Selector", + "description": "Default snippet for Microsoft.Common.Selector", + "body": { + "type": "Microsoft.Common.Selector" + } + }, + { + "label": "Microsoft.Common.Slider", + "description": "Default snippet for Microsoft.Common.Slider", + "body": { + "type": "Microsoft.Common.Slider" + } + }, + { + "label": "Microsoft.Common.TagsByResource", + "description": "Default snippet for Microsoft.Common.TagsByResource", + "body": { + "type": "Microsoft.Common.TagsByResource" + } + }, + { + "label": "Microsoft.Common.TextBlock", + "description": "Default snippet for Microsoft.Common.TextBlock", + "body": { + "type": "Microsoft.Common.TextBlock" + } + }, + { + "label": "Microsoft.Common.TextBox", + "description": "Default snippet for Microsoft.Common.TextBox", + "body": { + "type": "Microsoft.Common.TextBox" + } + }, + { + "label": "Microsoft.Compute.CredentialsCombo for Linux", + "description": "Default snippet for Microsoft.Compute.CredentialsCombo for Linux", + "body": { + "type": "Microsoft.Compute.CredentialsCombo", + "osPlatform": "Linux" + } + }, + { + "label": "Microsoft.Compute.CredentialsCombo for Windows", + "description": "Default snippet for Microsoft.Compute.CredentialsCombo for Windows", + "body": { + "type": "Microsoft.Compute.CredentialsCombo", + "osPlatform": "Windows" + } + }, + { + "label": "Microsoft.Compute.SizeSelector", + "description": "Default snippet for Microsoft.Compute.SizeSelector", + "body": { + "type": "Microsoft.Compute.SizeSelector" + } + }, + { + "label": "Microsoft.Compute.UserNameTextBox", + "description": "Default snippet for Microsoft.Compute.UserNameTextBox", + "body": { + "type": "Microsoft.Compute.UserNameTextBox" + } + }, + { + "label": "Microsoft.KeyVault.KeyVaultCertificateSelector", + "description": "Default snippet for Microsoft.KeyVault.KeyVaultCertificateSelector", + "body": { + "type": "Microsoft.KeyVault.KeyVaultCertificateSelector" + } + }, + { + "label": "Microsoft.ManagedIdentity.IdentitySelector", + "description": "Default snippet for Microsoft.ManagedIdentity.IdentitySelector", + "body": { + "type": "Microsoft.ManagedIdentity.IdentitySelector" + } + }, + { + "label": "Microsoft.Network.PublicIpAddressCombo", + "description": "Default snippet for Microsoft.Network.PublicIpAddressCombo", + "body": { + "type": "Microsoft.Network.PublicIpAddressCombo" + } + }, + { + "label": "Microsoft.Network.VirtualNetworkCombo", + "description": "Default snippet for Microsoft.Network.VirtualNetworkCombo", + "body": { + "type": "Microsoft.Network.VirtualNetworkCombo" + } + }, + { + "label": "Microsoft.Solutions.ArmApiControl", + "description": "Default snippet for Microsoft.Solutions.ArmApiControl", + "body": { + "type": "Microsoft.Solutions.ArmApiControl" + } + }, + { + "label": "Microsoft.Solutions.ResourceSelector", + "description": "Default snippet for Microsoft.Solutions.ResourceSelector", + "body": { + "type": "Microsoft.Solutions.ResourceSelector" + } + }, + { + "label": "Microsoft.Storage.MultiStorageAccountCombo", + "description": "Default snippet for Microsoft.Storage.MultiStorageAccountCombo", + "body": { + "type": "Microsoft.Storage.MultiStorageAccountCombo" + } + }, + { + "label": "Microsoft.Storage.StorageAccountSelector", + "description": "Default snippet for Microsoft.Storage.StorageAccountSelector", + "body": { + "type": "Microsoft.Storage.StorageAccountSelector" + } + }, + { + "label": "Microsoft.Storage.StorageBlobSelector", + "description": "Default snippet for Microsoft.Storage.StorageBlobSelector", + "body": { + "type": "Microsoft.Storage.StorageBlobSelector" + } + }, + { + "label": "Microsoft.Common.ServicePrincipalSelector", + "description": "Default snippet for Microsoft.Common.ServicePrincipalSelector", + "body": { + "type": "Microsoft.Common.ServicePrincipalSelector" + } + }, + { + "label": "Microsoft.Solutions.GraphApiControl", + "description": "Default snippet for Microsoft.Solutions.GraphApiControl", + "body": { + "type": "Microsoft.Solutions.GraphApiControl" + } + }, + { + "label": "Microsoft.Common.TenantSelector", + "description": "Default snippet for Microsoft.Common.TenantSelector", + "body": { + "type": "Microsoft.Common.TenantSelector" + } + }, + { + "label": "Microsoft.Common.ManagementGroupSelector", + "description": "Default snippet for Microsoft.Common.ManagementGroupSelector", + "body": { + "type": "Microsoft.Common.ManagementGroupSelector" + } + }, + { + "label": "Microsoft.Common.SubscriptionSelector", + "description": "Default snippet for Microsoft.Common.SubscriptionSelector", + "body": { + "type": "Microsoft.Common.SubscriptionSelector" + } + }, + { + "label": "Microsoft.Common.ResourceGroupSelector", + "description": "Default snippet for Microsoft.Common.ResourceGroupSelector", + "body": { + "type": "Microsoft.Common.ResourceGroupSelector" + } + }, + { + "label": "Microsoft.Common.LocationSelector", + "description": "Default snippet for Microsoft.Common.LocationSelector", + "body": { + "type": "Microsoft.Common.LocationSelector" + } + }, + { + "label": "Microsoft.Solutions.BladeInvokeControl", + "description": "Default snippet for Microsoft.Solutions.BladeInvokeControl", + "body": { + "type": "Microsoft.Solutions.BladeInvokeControl" + } + } + ] + }, + "Microsoft.Common.CheckBox": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.CheckBox" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "validationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label" + ] + }, + "Microsoft.Common.DropDown": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.DropDown" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "$ref": "#/definitions/defaultOptionValue" + }, + "placeholder": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "multiselect": { + "type": [ + "boolean", + "string" + ] + }, + "selectAll": { + "type": [ + "boolean", + "string" + ] + }, + "filter": { + "type": [ + "boolean", + "string" + ] + }, + "filterPlaceholder": { + "$ref": "#/definitions/stringResource" + }, + "multiLine": { + "type": [ + "boolean", + "string" + ] + }, + "defaultDescription": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Microsoft.Common.DropDown.Constraints" + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "constraints" + ] + }, + "defaultOptionValue": { + "oneOf": [ + { + "$ref": "#/definitions/stringResource" + }, + { + "type": "object", + "properties": { + "value": { + "type": [ + "string", + "number", + "boolean", + "object" + ] + } + }, + "required": [ + "value" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + } + }, + "required": [ + "label" + ], + "additionalProperties": false + } + ] + }, + "Microsoft.Common.DropDown.Constraints": { + "type": "object", + "properties": { + "allowedValues": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "description": { + "$ref": "#/definitions/stringResource" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "label", + "value" + ] + }, + "minItems": 1 + }, + { + "type": "string" + } + ] + }, + "required": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "allowedValues" + ] + }, + "Microsoft.Common.EditableGrid": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.EditableGrid" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "ariaLabel": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "type": "object", + "properties": { + "rows": { + "type": "object", + "properties": { + "count": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + }, + "required": [ + "min", + "max" + ], + "additionalProperties": false + } + }, + "required": [ + "count" + ], + "additionalProperties": false + }, + "columns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "header": { + "$ref": "#/definitions/stringResource" + }, + "element": { + "$ref": "#/definitions/Editablegrid.ColumnElement" + }, + "width": { + "type": "string", + "default": "1fr" + } + }, + "required": [ + "id", + "header", + "element" + ], + "additionalProperties": false + } + }, + "width": { + "type": "string", + "enum": [ + "Small", + "Medium", + "Full" + ] + } + } + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "constraints", + "ariaLabel" + ] + }, + "Editablegrid.ColumnElement": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/Editablegrid.DropDownElement" + }, + { + "$ref": "#/definitions/Editablegrid.OptionsGroupElement" + }, + { + "$ref": "#/definitions/Editablegrid.TextBoxElement" + } + ], + "defaultSnippets": [ + { + "label": "Microsoft.Common.DropDown", + "description": "Default snippet for Microsoft.Common.DropDown", + "body": { + "type": "Microsoft.Common.DropDown" + } + }, + { + "label": "Microsoft.Common.OptionsGroup", + "description": "Default snippet for Microsoft.Common.OptionsGroup", + "body": { + "type": "Microsoft.Common.OptionsGroup" + } + }, + { + "label": "Microsoft.Common.TextBox", + "description": "Default snippet for Microsoft.Common.TextBox", + "body": { + "type": "Microsoft.Common.TextBox" + } + } + ] + }, + "Editablegrid.DropDownElement": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.DropDown" + ] + }, + "placeholder": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "$ref": "#/definitions/Microsoft.Common.DropDown.Constraints" + } + }, + "required": [ + "type", + "constraints" + ], + "additionalProperties": false + }, + "Editablegrid.OptionsGroupElement": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.OptionsGroup" + ] + }, + "constraints": { + "$ref": "#/definitions/Microsoft.Common.OptionsGroup.Constraints" + }, + "additionalProperties": false + }, + "required": [ + "type", + "constraints" + ], + "additionalProperties": false + }, + "Microsoft.Common.OptionsGroup.Constraints": { + "type": "object", + "properties": { + "allowedValues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "label", + "value" + ] + }, + "minItems": 1 + }, + "required": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "allowedValues" + ] + }, + "Editablegrid.TextBoxElement": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.TextBox" + ] + }, + "placeholder": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "$ref": "#/definitions/Microsoft.Common.TextBox.Constraints" + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "Microsoft.Common.TextBox.Constraints": { + "anyOf": [ + { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "regex": { + "type": "string" + }, + "validationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "validations": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "message": { + "$ref": "#/definitions/stringResource" + }, + "isValid": { + "type": "string" + }, + "await": { + "type": "string" + }, + "skip": { + "type": [ + "string", + "boolean" + ] + } + }, + "additionalProperties": false, + "required": [ + "message", + "isValid" + ] + }, + { + "type": "object", + "properties": { + "message": { + "$ref": "#/definitions/stringResource" + }, + "regex": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "message", + "regex" + ] + } + ] + } + } + }, + "additionalProperties": false + } + ] + }, + "Microsoft.Common.Grid": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.Grid" + ] + }, + "label": { + "type": "object", + "properties": { + "summary": { + "$ref": "#/definitions/stringResource" + }, + "addition": { + "$ref": "#/definitions/stringResource" + }, + "delete": { + "$ref": "#/definitions/stringResource" + }, + "ariaLabel": { + "$ref": "#/definitions/stringResource" + } + } + }, + "defaultValue": { + "type": [ + "array", + "string" + ] + }, + "addBlade": { + "$ref": "#/definitions/Grid.BladeReference" + }, + "editBlade": { + "$ref": "#/definitions/Grid.BladeReference" + }, + "constraints": { + "type": "object", + "properties": { + "rows": { + "type": "object", + "properties": { + "count": { + "type": "object", + "properties": { + "min": { + "type": "number" + }, + "max": { + "type": "number" + } + }, + "required": [ + "min", + "max" + ], + "additionalProperties": false + } + }, + "required": [ + "count" + ], + "additionalProperties": false + }, + "canEditRows": { + "type": "boolean" + }, + "validations": { + "type": "array", + "items": { + "$ref": "#/definitions/isValidValidation" + } + }, + "columns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "header": { + "$ref": "#/definitions/stringResource" + }, + "element": { + "$ref": "#/definitions/Editablegrid.ColumnElement" + }, + "width": { + "type": "string", + "default": "1fr" + }, + "cellType": { + "type": "string", + "enum": [ + "readonly", + "input" + ] + }, + "text": { + "type": "string" + } + }, + "required": [ + "id", + "header", + "cellType" + ], + "additionalProperties": false + } + }, + "width": { + "type": "string", + "enum": [ + "Small", + "Medium", + "Full" + ] + } + }, + "required": [ + "columns" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "constraints", + "addBlade" + ] + }, + "Grid.BladeReference": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "parameters": { + "type": "object" + }, + "outputItem": { + "type": "string" + }, + "inContextPane": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "outputItem", + "parameters" + ] + }, + "isValidValidation": { + "type": "object", + "properties": { + "isValid": { + "type": "string" + }, + "message": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "isValid", + "message" + ] + }, + "Microsoft.Common.FileUpload": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.FileUpload" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "accept": { + "type": "string" + } + }, + "additionalProperties": false + }, + "options": { + "type": "object", + "properties": { + "multiple": { + "type": [ + "boolean", + "string" + ] + }, + "uploadMode": { + "type": "string" + }, + "openMode": { + "type": "string" + }, + "encoding": { + "type": "string" + } + }, + "additionalProperties": false + }, + "scope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subscriptionId" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "scope" + ] + }, + "Microsoft.Common.InfoBox": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.InfoBox" + ] + }, + "options": { + "type": "object", + "properties": { + "style": { + "type": "string", + "enum": [ + "Info", + "Warning", + "Error", + "None" + ] + }, + "text": { + "$ref": "#/definitions/stringResource" + }, + "uri": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "text": { + "$ref": "#/definitions/stringResource" + } + }, + "required": [ + "value", + "text" + ], + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false, + "required": [ + "style", + "text" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "options" + ] + }, + "Microsoft.Common.OptionsGroup": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.OptionsGroup" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "$ref": "#/definitions/defaultOptionValue" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "$ref": "#/definitions/Microsoft.Common.OptionsGroup.Constraints" + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "constraints" + ] + }, + "Microsoft.Common.PasswordBox": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.PasswordBox" + ] + }, + "label": { + "type": "object", + "properties": { + "password": { + "$ref": "#/definitions/stringResource" + }, + "confirmPassword": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "password", + "confirmPassword" + ] + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "regex": { + "type": "string" + }, + "validationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "options": { + "type": "object", + "properties": { + "hideConfirmation": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label" + ] + }, + "Microsoft.Common.ResourceScope": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.ResourceScope" + ] + }, + "globalResource": { + "type": "boolean" + }, + "instanceDetailsLabel": { + "$ref": "#/definitions/stringResource" + }, + "subscription": { + "$ref": "#/definitions/resourceScopeSubscription" + }, + "resourceGroup": { + "$ref": "#/definitions/resourceScopeResourceGroup" + }, + "resourceName": { + "$ref": "#/definitions/resourceScopeResourceName" + }, + "location": { + "$ref": "#/definitions/resourceScopeLocation" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "resourceScopeSubscription": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/resourceConstraints" + }, + "resourceProviders": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "additionalProperties": false + }, + "resourceConstraints": { + "type": "object", + "properties": { + "validations": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/isValidValidation" + }, + { + "$ref": "#/definitions/permissionValidation" + } + ] + } + } + }, + "required": [ + "validations" + ], + "additionalProperties": false + }, + "permissionValidation": { + "type": "object", + "properties": { + "permission": { + "type": "string" + }, + "message": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "permission", + "message" + ] + }, + "resourceScopeResourceGroup": { + "type": "object", + "properties": { + "constraints": { + "type": "object", + "properties": { + "validations": { + "type": "array", + "items": { + "$ref": "#/definitions/isValidValidation" + } + } + }, + "additionalProperties": false + }, + "allowExisting": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "resourceScopeResourceName": { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "type": "object", + "properties": { + "validations": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/isValidValidation" + }, + { + "$ref": "#/definitions/regexValidation" + } + ] + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "regexValidation": { + "type": "object", + "properties": { + "regex": { + "type": "string" + }, + "message": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "regex", + "message" + ] + }, + "resourceScopeLocation": { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "resourceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "allowedValues": { + "type": [ + "string", + "array" + ], + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "additionalProperties": false + }, + "Microsoft.Common.Section": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.Section" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "elements": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/formControls" + }, + { + "not": { + "$ref": "#/definitions/Microsoft.Common.Section" + } + } + ] + }, + "minItems": 1 + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "elements" + ] + }, + "Microsoft.Common.Selector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.Selector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "link": { + "$ref": "#/definitions/stringResource" + }, + "keyPath": { + "type": "string" + }, + "value": { + "type": "string" + }, + "defaultValue": { + "type": "object" + }, + "valueMapping": { + "$ref": "#/definitions/propertyValueMappingReference" + } + }, + "required": [ + "name", + "type", + "label", + "keyPath", + "defaultValue", + "value" + ], + "additionalProperties": false + }, + "propertyValueMappingReference": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "displayName": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "value", + "displayName" + ] + } + }, + "Microsoft.Common.Slider": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.Slider" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "subLabel": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "type": [ + "integer", + "string" + ] + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "showStepMarkers": { + "type": [ + "boolean", + "string" + ] + }, + "min": { + "type": "integer" + }, + "max": { + "type": "integer" + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "min", + "max" + ] + }, + "Microsoft.Common.TagsByResource": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.TagsByResource" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "resources": { + "type": "array", + "items": { + "type": "string" + } + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "resources" + ] + }, + "Microsoft.Common.TextBlock": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.TextBlock" + ] + }, + "options": { + "type": "object", + "oneOf": [ + { + "properties": { + "text": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "text" + ] + }, + { + "properties": { + "text": { + "$ref": "#/definitions/stringResource" + }, + "link": { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "label", + "uri" + ] + } + }, + "additionalProperties": false, + "required": [ + "link" + ] + } + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "options" + ] + }, + "Microsoft.Common.TextBox": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.TextBox" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "subLabel": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "$ref": "#/definitions/stringResource" + }, + "placeholder": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "$ref": "#/definitions/Microsoft.Common.TextBox.Constraints" + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "multiLine": { + "type": "boolean" + }, + "readOnly": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label" + ] + }, + "Microsoft.Compute.CredentialsCombo-Linux": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Compute.CredentialsCombo" + ] + }, + "label": { + "type": "object", + "properties": { + "authenticationType": { + "$ref": "#/definitions/stringResource" + }, + "password": { + "$ref": "#/definitions/stringResource" + }, + "confirmPassword": { + "$ref": "#/definitions/stringResource" + }, + "sshPublicKey": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "authenticationType", + "password", + "confirmPassword", + "sshPublicKey" + ] + }, + "toolTip": { + "type": "object", + "properties": { + "authenticationType": { + "$ref": "#/definitions/stringResource" + }, + "password": { + "$ref": "#/definitions/stringResource" + }, + "sshPublicKey": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "customPasswordRegex": { + "type": "string" + }, + "customValidationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "options": { + "type": "object", + "properties": { + "hideConfirmation": { + "type": [ + "boolean", + "string" + ] + }, + "hidePassword": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "osPlatform": { + "type": "string", + "enum": [ + "Linux" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "osPlatform" + ] + }, + "Microsoft.Compute.CredentialsCombo-Windows": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Compute.CredentialsCombo" + ] + }, + "label": { + "type": "object", + "properties": { + "password": { + "$ref": "#/definitions/stringResource" + }, + "confirmPassword": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "password", + "confirmPassword" + ] + }, + "toolTip": { + "type": "object", + "properties": { + "password": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "customPasswordRegex": { + "type": "string" + }, + "customValidationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "options": { + "type": "object", + "properties": { + "hideConfirmation": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "osPlatform": { + "type": "string", + "enum": [ + "Windows" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "osPlatform" + ] + }, + "Microsoft.Compute.SizeSelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Compute.SizeSelector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "recommendedSizes": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "constraints": { + "type": "object", + "oneOf": [ + { + "type": "object", + "properties": { + "allowedSizes": { + "type": "array", + "items": { + "type": "string" + } + }, + "numAvailabilityZonesRequired": { + "type": "integer" + }, + "zone": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "excludedSizes": { + "type": "array", + "items": { + "type": "string" + } + }, + "numAvailabilityZonesRequired": { + "type": "integer" + }, + "zone": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "options": { + "type": "object", + "properties": { + "hideDiskTypeFilter": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "osPlatform": { + "type": "string" + }, + "imageReference": { + "type": "object", + "properties": { + "publisher": { + "type": "string" + }, + "offer": { + "type": "string" + }, + "sku": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "publisher", + "offer", + "sku" + ] + }, + "count": { + "type": [ + "integer", + "string" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "scope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subscriptionId", + "location" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "recommendedSizes", + "osPlatform", + "scope" + ] + }, + "Microsoft.Compute.UserNameTextBox": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Compute.UserNameTextBox" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "type": "string" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "regex": { + "type": "string" + }, + "validationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "osPlatform": { + "type": "string", + "enum": [ + "Linux", + "Windows" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "osPlatform" + ] + }, + "Microsoft.KeyVault.KeyVaultCertificateSelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.KeyVault.KeyVaultCertificateSelector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "scope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subscriptionId", + "location" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "scope" + ] + }, + "Microsoft.ManagedIdentity.IdentitySelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.ManagedIdentity.IdentitySelector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "type": "object", + "properties": { + "systemAssignedIdentity": { + "$ref": "#/definitions/stringResource" + }, + "userAssignedIdentity": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "defaultValue": { + "type": "object", + "properties": { + "systemAssignedIdentity": { + "type": "string", + "enum": [ + "On", + "Off", + "OnOnly", + "OffOnly" + ] + } + }, + "additionalProperties": false + }, + "options": { + "type": "object", + "properties": { + "hideSystemAssignedIdentity": { + "type": [ + "boolean", + "string" + ] + }, + "hideUserAssignedIdentity": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label" + ] + }, + "Microsoft.Network.PublicIpAddressCombo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Network.PublicIpAddressCombo" + ] + }, + "label": { + "type": "object", + "properties": { + "publicIpAddress": { + "$ref": "#/definitions/stringResource" + }, + "domainNameLabel": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "publicIpAddress", + "domainNameLabel" + ] + }, + "toolTip": { + "type": "object", + "properties": { + "publicIpAddress": { + "$ref": "#/definitions/stringResource" + }, + "domainNameLabel": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "defaultValue": { + "type": "object", + "properties": { + "publicIpAddressName": { + "type": "string" + }, + "domainNameLabel": { + "type": "string" + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": "object", + "properties": { + "domainNameLabel": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "options": { + "type": "object", + "properties": { + "hideNone": { + "type": [ + "boolean", + "string" + ] + }, + "hideDomainNameLabel": { + "type": [ + "boolean", + "string" + ] + }, + "hideExisting": { + "type": [ + "boolean", + "string" + ] + }, + "zone": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "scope": { + "$ref": "#/definitions/formControlScope" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "scope" + ] + }, + "formControlScope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + }, + "resourceGroupName": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subscriptionId", + "resourceGroupName", + "location" + ] + }, + "Microsoft.Network.VirtualNetworkCombo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Network.VirtualNetworkCombo" + ] + }, + "label": { + "type": "object", + "properties": { + "virtualNetwork": { + "$ref": "#/definitions/stringResource" + }, + "subnets": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "virtualNetwork", + "subnets" + ] + }, + "toolTip": { + "type": "object", + "properties": { + "virtualNetwork": { + "$ref": "#/definitions/stringResource" + }, + "subnets": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "defaultValue": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "addressPrefixSize": { + "type": "string" + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "minAddressPrefixSize": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "minAddressPrefixSize" + ] + }, + "options": { + "type": "object", + "properties": { + "hideExisting": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "subnets": { + "type": "object", + "patternProperties": { + ".": { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "addressPrefixSize": { + "type": "string" + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "minAddressPrefixSize": { + "type": "string" + }, + "minAddressCount": { + "type": [ + "integer", + "string" + ] + }, + "requireContiguousAddresses": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "minAddressPrefixSize" + ] + } + }, + "additionalProperties": false, + "required": [ + "label", + "constraints" + ] + } + }, + "additionalProperties": false, + "minProperties": 1 + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "scope": { + "$ref": "#/definitions/formControlScope" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "constraints", + "subnets", + "scope" + ] + }, + "Microsoft.Solutions.ArmApiControl": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Solutions.ArmApiControl" + ] + }, + "condition": { + "type": [ + "string", + "boolean" + ] + }, + "request": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" + ] + }, + "path": { + "type": "string" + }, + "body": { + "type": [ + "string", + "object" + ] + }, + "transforms": { + "$ref": "#/definitions/transforms" + } + }, + "additionalProperties": false, + "required": [ + "method", + "path" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "request" + ] + }, + "transforms": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Microsoft.Solutions.ResourceSelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Solutions.ResourceSelector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "resourceType": { + "type": "string" + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "scope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + }, + "location": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "resourceType" + ] + }, + "Microsoft.Storage.MultiStorageAccountCombo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Storage.MultiStorageAccountCombo" + ] + }, + "label": { + "type": "object", + "properties": { + "prefix": { + "$ref": "#/definitions/stringResource" + }, + "type": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false, + "required": [ + "prefix", + "type" + ] + }, + "toolTip": { + "type": "object", + "properties": { + "prefix": { + "$ref": "#/definitions/stringResource" + }, + "type": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + }, + "defaultValue": { + "type": "object", + "properties": { + "prefix": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "constraints": { + "oneOf": [ + { + "type": "object", + "properties": { + "allowedTypes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "excludedTypes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + ] + }, + "count": { + "type": [ + "integer", + "string" + ] + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "scope": { + "$ref": "#/definitions/formControlScope" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "count", + "scope" + ] + }, + "Microsoft.Storage.StorageAccountSelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Storage.StorageAccountSelector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "defaultValue": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "constraints": { + "oneOf": [ + { + "type": "object", + "properties": { + "allowedTypes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "excludedTypes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + ] + }, + "options": { + "type": "object", + "properties": { + "hideExisting": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "scope": { + "$ref": "#/definitions/formControlScope" + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "scope" + ] + }, + "Microsoft.Storage.StorageBlobSelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Storage.StorageBlobSelector" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "options": { + "type": "object", + "properties": { + "text": { + "$ref": "#/definitions/stringResource" + } + }, + "required": [ + "text" + ], + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "allowedFileExtensions": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "allowedFileExtensions" + ], + "additionalProperties": false + }, + "scope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "subscriptionId" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "scope" + ] + }, + "Microsoft.Common.ServicePrincipalSelector": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.ServicePrincipalSelector" + ] + }, + "label": { + "type": "object", + "properties": { + "principalId": { + "$ref": "#/definitions/stringResource" + }, + "password": { + "$ref": "#/definitions/stringResource" + }, + "certificateThumbprint": { + "$ref": "#/definitions/stringResource" + }, + "authenticationType": { + "$ref": "#/definitions/stringResource" + }, + "sectionHeader": { + "$ref": "#/definitions/stringResource" + } + } + }, + "toolTip": { + "type": "object", + "properties": { + "principalId": { + "$ref": "#/definitions/stringResource" + }, + "password": { + "$ref": "#/definitions/stringResource" + }, + "certificateThumbprint": { + "$ref": "#/definitions/stringResource" + }, + "authenticationType": { + "$ref": "#/definitions/stringResource" + } + } + }, + "defaultValue": { + "type": "object", + "properties": { + "principalId": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "visible": { + "type": [ + "boolean", + "string" + ] + }, + "options": { + "type": "object", + "properties": { + "hideCertificate": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false + }, + "constraints": { + "type": "object", + "properties": { + "required": { + "type": [ + "boolean", + "string" + ] + }, + "regex": { + "type": "string" + }, + "validationMessage": { + "$ref": "#/definitions/stringResource" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "name", + "type" + ] + }, + "Microsoft.Solutions.GraphApiControl": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Solutions.GraphApiControl" + ] + }, + "condition": { + "type": [ + "string", + "boolean" + ] + }, + "request": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": [ + "GET" + ] + }, + "path": { + "type": "string" + }, + "transforms": { + "$ref": "#/definitions/transforms" + } + }, + "additionalProperties": false, + "required": [ + "method", + "path" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "request" + ] + }, + "Microsoft.Common.TenantSelector": { + "allOf": [ + { + "$ref": "#/definitions/isBasicControl" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.TenantSelector" + ] + }, + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/validationSpec" + }, + "minItems": 1 + } + }, + "required": [ + "type" + ] + } + ] + }, + "isBasicControl": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "required": [ + "name" + ] + }, + "validationSpec": { + "type": "object", + "properties": { + "isValid": { + "type": [ + "string", + "boolean" + ] + }, + "message": { + "$ref": "#/definitions/stringResource" + } + }, + "required": [ + "isValid" + ], + "additionalProperties": false + }, + "Microsoft.Common.ManagementGroupSelector": { + "allOf": [ + { + "$ref": "#/definitions/isBasicControl" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.ManagementGroupSelector" + ] + }, + "constraints": { + "type": "array", + "items": { + "$ref": "#/definitions/validationSpec" + }, + "minItems": 1 + } + }, + "required": [ + "type" + ] + } + ] + }, + "Microsoft.Common.SubscriptionSelector": { + "allOf": [ + { + "$ref": "#/definitions/isBasicControl" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.SubscriptionSelector" + ] + }, + "resourceProviders": { + "type": "array", + "items": { + "type": "string" + } + }, + "constraints": { + "$ref": "#/definitions/resourceConstraints" + } + }, + "required": [ + "type" + ] + } + ] + }, + "Microsoft.Common.ResourceGroupSelector": { + "allOf": [ + { + "$ref": "#/definitions/isBasicControl" + }, + { + "$ref": "#/definitions/hasScope" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.ResourceGroupSelector" + ] + }, + "allowedMode": { + "type": "string", + "enum": [ + "Both", + "CreateNew", + "UseExisting" + ] + }, + "constraints": { + "$ref": "#/definitions/resourceConstraints" + } + }, + "required": [ + "type" + ] + } + ] + }, + "hasScope": { + "type": "object", + "properties": { + "scope": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + } + }, + "required": [ + "subscriptionId" + ], + "additionalProperties": false + } + }, + "required": [ + "scope" + ] + }, + "Microsoft.Common.LocationSelector": { + "allOf": [ + { + "$ref": "#/definitions/isNamedControl" + }, + { + "$ref": "#/definitions/hasScope" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.LocationSelector" + ] + }, + "resourceTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "allowedValues": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "isNamedControl": { + "allOf": [ + { + "$ref": "#/definitions/isBasicControl" + }, + { + "type": "object", + "properties": { + "label": { + "$ref": "#/definitions/stringResource" + }, + "toolTip": { + "$ref": "#/definitions/stringResource" + } + }, + "required": [ + "label" + ] + } + ] + }, + "Microsoft.Solutions.BladeInvokeControl": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Solutions.BladeInvokeControl" + ] + }, + "openBladeStatus": { + "type": "string" + }, + "bladeReference": { + "$ref": "#/definitions/bladeReferenceWithParameters" + }, + "defaultValue": { + "type": "object" + }, + "transforms": { + "$ref": "#/definitions/transforms" + } + }, + "required": [ + "name", + "type", + "openBladeStatus", + "bladeReference" + ], + "additionalProperties": false + }, + "bladeReferenceWithParameters": { + "oneOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "parameters": { + "type": "object" + } + }, + "additionalProperties": false, + "required": [ + "name" + ] + }, + { + "type": "string" + } + ] + }, + "formControlsWithoutResourceScope": { + "allOf": [ + { + "$ref": "#/definitions/formControls" + }, + { + "not": { + "$ref": "#/definitions/Microsoft.Common.ResourceScope" + } + } + ] + }, + "formStepWithoutResourceScope": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "description": { + "$ref": "#/definitions/stringResource" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/definitions/formControlsWithoutResourceScope" + } + } + }, + "additionalProperties": false, + "required": [ + "name", + "label", + "elements" + ] + } + }, + "type": "object", + "properties": { + "$schema": { + "type": "string" + }, + "view": { + "$ref": "#/definitions/createFormViewType" + } + }, + "additionalProperties": false +} \ No newline at end of file From c28cdeb614787b1b44a3001ccc6b0a1687b3589a Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Wed, 15 Sep 2021 11:11:23 -0700 Subject: [PATCH 2/9] Fixing the schema by removing the # at the end --- schemas/2021-09-09/uiFormDefinition.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/2021-09-09/uiFormDefinition.schema.json b/schemas/2021-09-09/uiFormDefinition.schema.json index fdb07f3f78..f10554befe 100644 --- a/schemas/2021-09-09/uiFormDefinition.schema.json +++ b/schemas/2021-09-09/uiFormDefinition.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "http://json-schema.org/draft-07/schema", "definitions": { "createFormViewType": { "type": "object", From c673da8789dc085cd572045c2103ac0560d3c088 Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Wed, 15 Sep 2021 16:14:52 -0700 Subject: [PATCH 3/9] Fixing cyclic dependencies --- .../2021-09-09/uiFormDefinition.schema.json | 105 ++++++++++-------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/schemas/2021-09-09/uiFormDefinition.schema.json b/schemas/2021-09-09/uiFormDefinition.schema.json index f10554befe..dccc00b947 100644 --- a/schemas/2021-09-09/uiFormDefinition.schema.json +++ b/schemas/2021-09-09/uiFormDefinition.schema.json @@ -379,6 +379,16 @@ ] }, "formControls": { + "oneOf": [ + { + "$ref": "#/definitions/formControlsWithoutSection" + }, + { + "$ref": "#/definitions/Microsoft.Common.Section" + } + ] + }, + "formControlsWithoutSection": { "oneOf": [ { "$ref": "#/definitions/Microsoft.Common.CheckBox" @@ -407,9 +417,6 @@ { "$ref": "#/definitions/Microsoft.Common.ResourceScope" }, - { - "$ref": "#/definitions/Microsoft.Common.Section" - }, { "$ref": "#/definitions/Microsoft.Common.Selector" }, @@ -1898,52 +1905,6 @@ }, "additionalProperties": false }, - "Microsoft.Common.Section": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "Microsoft.Common.Section" - ] - }, - "label": { - "$ref": "#/definitions/stringResource" - }, - "elements": { - "type": "array", - "items": { - "allOf": [ - { - "$ref": "#/definitions/formControls" - }, - { - "not": { - "$ref": "#/definitions/Microsoft.Common.Section" - } - } - ] - }, - "minItems": 1 - }, - "visible": { - "type": [ - "boolean", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "label", - "elements" - ] - }, "Microsoft.Common.Selector": { "type": "object", "properties": { @@ -3879,6 +3840,52 @@ } ] }, + "Microsoft.Common.Section": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Common.Section" + ] + }, + "label": { + "$ref": "#/definitions/stringResource" + }, + "elements": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/definitions/formControlsWithoutSection" + }, + { + "not": { + "$ref": "#/definitions/Microsoft.Common.Section" + } + } + ] + }, + "minItems": 1 + }, + "visible": { + "type": [ + "boolean", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "name", + "type", + "label", + "elements" + ] + }, "formControlsWithoutResourceScope": { "allOf": [ { From 5df7cb00932fbca0156d90171855c486a5d4ab02 Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Wed, 15 Sep 2021 16:26:35 -0700 Subject: [PATCH 4/9] Fixing cyclic dependencies --- schemas/2021-09-09/uiFormDefinition.schema.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/schemas/2021-09-09/uiFormDefinition.schema.json b/schemas/2021-09-09/uiFormDefinition.schema.json index dccc00b947..197c776e50 100644 --- a/schemas/2021-09-09/uiFormDefinition.schema.json +++ b/schemas/2021-09-09/uiFormDefinition.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "createFormViewType": { "type": "object", @@ -3861,11 +3861,6 @@ "allOf": [ { "$ref": "#/definitions/formControlsWithoutSection" - }, - { - "not": { - "$ref": "#/definitions/Microsoft.Common.Section" - } } ] }, From e977176367763be0a689b711f062bddd1c8df329 Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Mon, 20 Sep 2021 09:52:04 -0700 Subject: [PATCH 5/9] Adding v7 schema support --- tools/tests.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/tests.ts b/tools/tests.ts index e605dabc97..cbe568e46f 100644 --- a/tools/tests.ts +++ b/tools/tests.ts @@ -7,6 +7,7 @@ import { promisify } from 'util'; import { getLanguageService } from 'vscode-json-languageservice'; import { TextDocument } from 'vscode-languageserver-types'; import draft4MetaSchema from 'ajv/lib/refs/json-schema-draft-04.json'; +import draft7MetaSchema from 'ajv/lib/refs/json-schema-draft-07.json'; import * as schemaTestsRunner from './schemaTestsRunner'; import 'mocha'; import { findCycle } from './cycleCheck'; @@ -19,6 +20,7 @@ const testSchemasFolder = __dirname + '/schemas/'; const templateTestsFolder = __dirname + '/templateTests/'; const armSchemasPrefix = /^https?:\/\/schema\.management\.azure\.com\/schemas\// const jsonSchemaDraft4Prefix = /^https?:\/\/json-schema\.org\/draft-04\/schema/ +const jsonSchemaDraft7Prefix = /^https?:\/\/json-schema\.org\/draft-07\/schema/ const ajvInstance = new Ajv({ loadSchema: loadSchema, @@ -26,6 +28,7 @@ const ajvInstance = new Ajv({ schemaId: 'id', meta: false }).addMetaSchema(draft4MetaSchema) + .addMetaSchema(draft7MetaSchema) .addFormat('int32', /.*/) .addFormat('duration', /.*/) .addFormat('password', /.*/); @@ -43,6 +46,9 @@ async function loadRawSchema(uri: string) : Promise { else if (uri.match(jsonSchemaDraft4Prefix)) { return JSON.stringify(draft4MetaSchema); } + else if (uri.match(jsonSchemaDraft7Prefix)) { + return JSON.stringify(draft7MetaSchema); + } else { jsonPath = uri; } From bceb043d479325ef379c8ca80e621de070c47743 Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Mon, 20 Sep 2021 09:56:35 -0700 Subject: [PATCH 6/9] Adding v7 schema support --- tools/tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tests.ts b/tools/tests.ts index cbe568e46f..92e8bb2f2d 100644 --- a/tools/tests.ts +++ b/tools/tests.ts @@ -91,6 +91,7 @@ function listSchemaPaths(basePath: string): string[] { const metaSchemaPaths = [ 'http://json-schema.org/draft-04/schema', + 'http://json-schema.org/draft-07/schema', testSchemasFolder + 'ResourceMetaSchema.json', ]; From 9fe05881b7aab858c8e852f9a97664d9131fdbc6 Mon Sep 17 00:00:00 2001 From: Shrisha Kumar Date: Mon, 20 Sep 2021 10:02:14 -0700 Subject: [PATCH 7/9] Fixing schema version --- schemas/2021-09-09/uiFormDefinition.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/2021-09-09/uiFormDefinition.schema.json b/schemas/2021-09-09/uiFormDefinition.schema.json index 197c776e50..1628030378 100644 --- a/schemas/2021-09-09/uiFormDefinition.schema.json +++ b/schemas/2021-09-09/uiFormDefinition.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "http://json-schema.org/draft-07/schema", "definitions": { "createFormViewType": { "type": "object", From c4dc4572fd1bc7d8faea2912f3632ea923a6171d Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Mon, 20 Sep 2021 15:14:50 -0400 Subject: [PATCH 8/9] Update tests.ts --- tools/tests.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/tests.ts b/tools/tests.ts index 92e8bb2f2d..8e6deb79f8 100644 --- a/tools/tests.ts +++ b/tools/tests.ts @@ -7,7 +7,6 @@ import { promisify } from 'util'; import { getLanguageService } from 'vscode-json-languageservice'; import { TextDocument } from 'vscode-languageserver-types'; import draft4MetaSchema from 'ajv/lib/refs/json-schema-draft-04.json'; -import draft7MetaSchema from 'ajv/lib/refs/json-schema-draft-07.json'; import * as schemaTestsRunner from './schemaTestsRunner'; import 'mocha'; import { findCycle } from './cycleCheck'; @@ -20,15 +19,13 @@ const testSchemasFolder = __dirname + '/schemas/'; const templateTestsFolder = __dirname + '/templateTests/'; const armSchemasPrefix = /^https?:\/\/schema\.management\.azure\.com\/schemas\// const jsonSchemaDraft4Prefix = /^https?:\/\/json-schema\.org\/draft-04\/schema/ -const jsonSchemaDraft7Prefix = /^https?:\/\/json-schema\.org\/draft-07\/schema/ const ajvInstance = new Ajv({ loadSchema: loadSchema, strictDefaults: true, schemaId: 'id', - meta: false + meta: true, }).addMetaSchema(draft4MetaSchema) - .addMetaSchema(draft7MetaSchema) .addFormat('int32', /.*/) .addFormat('duration', /.*/) .addFormat('password', /.*/); @@ -46,9 +43,6 @@ async function loadRawSchema(uri: string) : Promise { else if (uri.match(jsonSchemaDraft4Prefix)) { return JSON.stringify(draft4MetaSchema); } - else if (uri.match(jsonSchemaDraft7Prefix)) { - return JSON.stringify(draft7MetaSchema); - } else { jsonPath = uri; } @@ -91,7 +85,6 @@ function listSchemaPaths(basePath: string): string[] { const metaSchemaPaths = [ 'http://json-schema.org/draft-04/schema', - 'http://json-schema.org/draft-07/schema', testSchemasFolder + 'ResourceMetaSchema.json', ]; @@ -140,6 +133,7 @@ const schemasToSkip = [ '2019-08-01/managementGroupDeploymentTemplate.json', '2019-08-01/tenantDeploymentParameters.json', '2019-08-01/tenantDeploymentTemplate.json', + '2021-09-09/uiFormDefinition.schema.json', 'common/definitions.json', 'common/manuallyAddedResources.json', 'common/autogeneratedResources.json', @@ -235,4 +229,4 @@ describe('Validate test templates against VSCode language service', () => { expect(result).to.deep.equal([]); }); } -}); \ No newline at end of file +}); From d0413d9ef9aff103820fd9cfa3cd678fce21d18d Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Mon, 20 Sep 2021 15:34:46 -0400 Subject: [PATCH 9/9] Add "id" field --- schemas/2021-09-09/uiFormDefinition.schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schemas/2021-09-09/uiFormDefinition.schema.json b/schemas/2021-09-09/uiFormDefinition.schema.json index 1628030378..8e38261426 100644 --- a/schemas/2021-09-09/uiFormDefinition.schema.json +++ b/schemas/2021-09-09/uiFormDefinition.schema.json @@ -1,4 +1,5 @@ { + "id": "https://schema.management.azure.com/schemas/2021-09-09/uiFormDefinition.schema.json#", "$schema": "http://json-schema.org/draft-07/schema", "definitions": { "createFormViewType": { @@ -3930,4 +3931,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +}