Azure / Azure/azure-rest-api-specs
DashboardPartMetadata does not allow additional fields
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
specification/portal/resource-manager/Microsoft.Portal/preview/2022-12-01-preview/portal.json#/definitions/DashboardPartMetadata and possibly other versions are incorrectly specified. They are specified as an object with the sole property `type`. This is does not match the sample extracted from a real interaction with operation id "Dashboards_Get":
```json
{
"properties": {
"lenses": [
{
"order": 0,
"parts": [
{
"position": {
"x": 0,
"y": 0,
"rowSpan": 4,
"colSpan": 6
},
"metadata": {
"inputs": [],
"type": "Extension/HubsExtension/PartType/MarkdownPart",
"settings": {
"content": {
"content": "",
"title": "aaa",
"subtitle": "bbb",
"markdownSource": 1,
"markdownUri": ""
}
}
}
}
]
}
],
"metadata": {
"model": {
"timeRange": {
"value": {
"relative": {
"duration": 24,
"timeUnit": 1
}
},
"type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange"
}
}
}
},
"location": "canadacentral",
"tags": {
"hidden-title": "My Dashboard (2)"
},
"id": "/subscriptions/00000000-00000000-00000000-00000000/resourceGroups/rg0/providers/Microsoft.Portal/dashboards/00000000-00000000-00000000-00000001",
"name": "00000000-00000000-00000000-00000001",
"type": "Microsoft.Portal/dashboards"
}
```
This can be fixed by setting `additionalProperties` to be true
Contributor guide
Assessment
This issue has not been assessed yet.