Azure / Azure/azure-rest-api-specs
[BUG] activity log alerts: location is not properly defined as required parameter
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json
### API Spec version
2020-10-01
### Describe the bug
Location not properly marked as required parameter -- or not properly using a default
### Expected behavior
Either set it to default to "Global" or whatever the default should be or mark it as required.
### Actual behavior
If not set:
```
{
"error": {
"code": "LocationRequired",
"message": "The location property is required for this definition."
}
}
```
### Reproduction Steps
Post a valid activity log alert without location:
minimal example:
```
{
"properties": {
"scopes": [
"/subscriptions/subscription_id/resourceGroups/resource_group"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "Administrative"
},
{
"field": "level",
"equals": "Error"
}
]
},
"actions": {
"actionGroups": [
{
"actionGroupId": "/subscriptions/subscription_id/resourceGroups/resource_group/providers/microsoft.insights/actionGroups/Monitoring-e-resource_group-ActionGroup"
}
]
}
}
}
```
### Environment
direct api access
Contributor guide
Research direction
Open specification/monitor/resource-manager/Microsoft.Insights/stable/2020-10-01/activityLogAlerts_API.json and inspect how the activity log alert location parameter is defined. Compare the schema with the reproduction request and decide whether the API contract should require location or provide a default. Done means the specification and the reported LocationRequired behavior agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100