What is the easiest way to check the createUIDefinion.json file for Azure solution templates?

I am going to publish a solution template in the Azure market.

My mainTemplate.json file, for example, is easily tested without publishing, since I can deploy it from Git. But I cannot verify the UI file using a Git deployment.

So the problem is that my createUIdefinition.json file is tested in a timely manner. It seems that every time I make changes to the createUIdefinition.json file, I have to upload a new package to the publishing portal, which means that I have to wait for Microsoft certification before I can conduct the test. This is a 24-hour process.

Is there an easier way to check my createUIdefinition.json changes without going through this process?

For example, I have an error somewhere in a regex that checks one of my user inputs:

{ "name": "EmailUser", "type": "Microsoft.Common.TextBox", "label": "Email Address", "toolTip": "The email address for your account", "defaultValue": "", "constraints": { "required": true, "regex": "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*", "validationMessage": "Must be a valid email address." } 

(A side note, if anyone can find my mistake - maybe when you run away with the characters? - please let me know! There is no email address that is being verified correctly.)

And that makes me chat a little, to wait one day to check on my supposed corrections. There must be a better way, thanks!

+7
json azure azure-marketplace
source share
1 answer

I have found my answer. There is a specially created URL that can be used to preview createUIDefinition.json. The format is as follows:

 <a href="https://portal.azure.com/#blade/Microsoft_Azure_Compute/CreateMultiVmWizardBlade/internal_bladeCallId/anything/internal_bladeCallerParams/{"initialData":{},"providerConfig":{"createUiDefinition":"URL_ENCODED_LINK TO_createUiDefinition.json"}}">[Preview createUiDefinition.json]</a> 

So, the steps for testing:

  • upload createUIdefinition.json to the public url (github or Azure blob storage work fine)
  • Modify the link above with the full URL of your file.
  • Paste it into your browser.
  • When a request appears in Azure, you will be redirected to your click (s).
  • Use F12 to open a script console in your browser to see the result in json format after filling in your user interface values.

Please note that you cannot complete a full deployment here, these steps are only for testing your user interface, checking your regular expression, etc. You still need to test the output and make sure that it works with your mainTemplate.json file with separate deployment.

+5
source share

All Articles