Azure / Azure/azure-rest-api-specs
Consumption API (2019-10-01) missing startDate and endDate query parameters and incorrect bool type
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
The consumption API definition has a couple of problems in the 2019-10-01 version:
* The query parameters startDate and endDate are missing for `UsageDetails_List` - for non-Enterprise Agreement subscriptions (e.g. PAYG or MCA) these allow filtering by date, adding `properties/usageStart` and `properties/usageEnd` to $filter has no effect. Manually specifying these parameters on the URL has the desired effect.
* The returned results from the API for the LegacyUsageDetailProperties and ModernUsageDetailProperties uses the string value "1" in the field `IsAzureCreditEligible`, which is defined in the spec as a boolean. At least in the Go Azure SDK, the string value "1" is not parseable as a boolean, so the parse fails.
Contributor guide
Research direction
Search the 2019-10-01 consumption API definition for `UsageDetails_List`, `LegacyUsageDetailProperties`, and `ModernUsageDetailProperties`. Verify the declared query parameters and the `IsAzureCreditEligible` type against the reported API responses. Done means both date filters are represented and the returned value can be parsed consistently with the specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100