When BCP035 is triggered on an extensible resource. The warning message always refers the user to the bicep-types-az repository
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
Bicep CLI version 0.36.90 (a8510cf601)
**Describe the bug**
When a resources from an extension is used and misses a required property. The following error is triggered:
`The specified "resource" declaration is missing the following required properties: "propertyName". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues.`
However, extensible resources are not Azure types and the warning message should not send the user to the repository meant for Azure resources schema issues.
**To Reproduce**
Using the following template:
```
extension microsoftGraphV1
resource app 'Microsoft.Graph/applications@v1.0' = {
}
```
The warning ´The specified "resource" declaration is missing the following required properties: "displayName", "uniqueName". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues.´ is provided. But in this specific case, the correct repository where an issue should be reported is https://github.com/microsoftgraph/msgraph-bicep-types.
Ideally it should not send the user to any repository.
Or extensions should have a way to provided a `repositoryUrl` for issues. Similarly to what is done with Azure DevOps marketplace extensions where the following properties are used to redirect the user to the license, issues, ...
```json
{
"repository": {
"type": "git",
"uri": "https://github.com/Azure/bicep"
},
"links": {
"getstarted": {
"uri": "https://github.com/Azure/bicep/blob/main/README.md"
},
"learn": {
"uri": "https://github.com/Azure/bicep/blob/main/README.md"
},
"license": {
"uri": "https://github.com/Azure/bicep/blob/master/LICENSE"
},
"support": {
"uri": "https://github.com/Azure/bicep/issues"
}
}
}
```
Contributor guide
Research direction
Reproduce the BCP035 diagnostic with the Microsoft.Graph applications extension template shown in the issue. Start at the code and tests that generate BCP035, then verify the message for extensible resources no longer directs users to bicep-types-az. The desired behavior still needs deciding between no repository link and an extension-provided support URL.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100