Azure / Azure/azure-rest-api-specs
[BUG] startDate&endDate returned by service should be in ISO 8601 format
- 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/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/billingAccount.json#L895
### API Spec version
2024-04-01
### Describe the bug
By the [swagger definition](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/billingAccount.json#L895), startDate&endDate of EnrollmentDetails were defined as `date-time` which should follow the [iso-8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) protocol, or it would cause deserialization error in the SDK.
### Expected behavior
All properties which defined as `date-time` should follow iso-8601 format in service response.
### Actual behavior
It returns in format like `{'startDate': '3/31/2015 12:00:00 AM +00:00', 'endDate': '3/31/2018 12:00:00 AM +00:00'}` which would cause deserialization error.
### Reproduction Steps
Call api: https://learn.microsoft.com/en-us/rest/api/billing/billing-accounts/list?view=rest-billing-2024-04-01&tabs=HTTP
### Environment
_No response_
Contributor guide
Research direction
Start with the EnrollmentDetails definition at line 895 of specification/billing/resource-manager/Microsoft.Billing/stable/2024-04-01/billingAccount.json and compare its date-time declaration with the documented billing accounts list response. Reproduce the response using the linked REST API, then verify that startDate and endDate use ISO 8601 and can be deserialized by the SDK.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100