Azure / Azure/azure-rest-api-specs
[BUG] Metric Alerts does not return properties.autoMitigate when using default
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json
### API Spec version
2018-03-01
### Describe the bug
Hi,
it seems then properties.autoMitigate is only returned by get/create or update when explicitly set to either true or false. It defaults to true server side when unset in a create/update so I'd say you should return it with its value, even if not explicitly set by create / update.
### Expected behavior
properties.autoMitigate returned always
### Actual behavior
properties.autoMitigate returned only when explicitly set to true/false by user
### Reproduction Steps
Create a metrics alert without properties.autoMitigate and then look at the returned object or do a seperate get on the newly created object.
### Environment
_No response_
Contributor guide
Research direction
Start with the linked specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json definition and inspect how properties.autoMitigate is represented. Confirm that the API specification captures the expected always-returned behavior when the server-side default is used, and verify the definition against the reported create, update, and get scenarios.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100