arm-ttk applies "CreateUIDefinition Must Not Have Blanks" test to user data
- Dominant language
- PowerShell
- Stars
- 468
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
**arm-ttk version:** 0.24
**Scenario:** You have a DropDown control where the value of each "allowedValue" constraint is a JSON object that is domain-specific (see the sample CUID below that applies to the _birds_ domain). Note that the JSON payload is user data, not CUID properties.
**Problem:** When running arm-ttk against this example, the following error is returned, indicating that arm-ttk is applying the "CreateUIDefinition Must Not Have Blanks" test case not only to CUID base constructs but also to user data:
```
CreateUIDefinition Must Not Have Blanks
- Error: Empty property: synonyms found on line: 15
```
**NOTE:** While one can argue that perhaps the JSON payloads of the user data should remove the empty properties, there are many cases, especially with generated data, where removing the empty property is not an option and adds a certain maintenance overhead.
**Sample CUID:**
```
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"basics": [
{
"constraints": {
"allowedValues": [
{
"label": "Pelican",
"value": {
"family": "Palecanidae",
"genus": "Pelecanus",
"synonyms": ""
}
},
{
"label": "Heron",
"value": {
"family": "Ardeidae",
"genus": "Ardea",
"synonyms": "Cochlearidae"
}
}
]
},
"label": "DropDown1",
"name": "DropDown1",
"toolTip": "DropDown1",
"type": "Microsoft.Common.DropDown"
}
],
"steps": [],
"outputs": {
"location": "[location()]",
"DropDown1": "[basics('DropDown1')]"
}
},
"metadata": {
"_generator": {
"name": "MaestroStudio",
"sku": "Solo",
"version": "0.9.0.0",
"template": {
"author": "StratusOn",
"id": "EA622966-CE0C-46E7-841B-73C2E6ED5DEB",
"description": "A blank Azure Marketplace Managed Application offer."
}
},
"_sync": {
"offer": {
"displayName": "My Offer"
},
"plan": {
"displayName": "Plan"
}
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.