Azure / Azure/bicep

Warning BCP036: The property "type" expected a value of type "'Extension/HubsExtension/PartType/MarkdownPart'" but the provided value is of type "'Extension/AppInsightsExtension/PartType/AspNetOverviewPinnedPart'"

Open
#4,497 2 comments 0 reactions 0 assignees View on GitHub
provider bug types: swagger inaccuracy
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 4h
Merged PRs (30d)
81

Description

**Bicep version**
Bicep CLI version 0.4.613 (d826ce8411)

**Describe the bug**
"Extension/AppInsightsExtension/PartType/AspNetOverviewPinnedPart'" is a valid part, but the schema is not upto date and this fails the validation.

**To Reproduce**
```bicep
@description('The resource name for the Application Insights dashboard.')
param applicationInsightsDashboardName string

@description('The resource name for the Application Insights instance.')
param applicationInsightsName string

@description('The location of the resources created, excluding \'Global\'.')
param resourceLocation string

resource applicationInsightsDashboardName_resource 'Microsoft.Portal/dashboards@2020-09-01-preview' = {
name: applicationInsightsDashboardName
location: resourceLocation
properties: {
lenses: [
{
order: 0
parts: [
{
position: {
x: 0
y: 0
rowSpan: 1
colSpan: 2
}
metadata: {
inputs: [
{
name: 'id'
value: resourceId('Microsoft.Insights/components', applicationInsightsName)
}
{
name: 'Version'
value: '1.0'
}
]
type: 'Extension/AppInsightsExtension/PartType/AspNetOverviewPinnedPart'
asset: {
idInputName: 'id'
type: 'ApplicationInsights'
}
defaultMenuItemId: 'overview'
}
}
]
}
]
}
tags: {
'hidden-title': '${applicationInsightsName} Dashboard'
}
}
```

**Additional context**
It would be good if biceplinter.config could disable individual rules.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the warning with the Microsoft.Portal/dashboards@2020-09-01-preview resource and inspect the schema used for metadata.type. The work is done when the valid AspNetOverviewPinnedPart value no longer triggers BCP036; the request about disabling individual rules is additional context.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.