API date-time response is...
API date-time response is not compliant with RFC3339
- Home
- Control Panel
- Community Forum
- General Discussion
- Product Suggestions
- API date-time response is not compliant with RFC3339
- Community Forum
- API date-time response is not compliant with RFC3339
Topic: API date-time response is not compliant with RFC3339
According to OpenAPI data type "date-time" should be in RFC3339 format (https://swagger.io/docs/specification/data-models/data-types/). Example: 2018-05-08T14:52:11.52Z (Note the "Z" in the end)The current API response truncates the timezone information, meaning the "Z" and everything that should come after it is missing.Example:curl -X GET "https://api.dynu.com/v2/dns" -H "accept: application/json" -H "API-Key: verysecurekey" | jq... "createdOn": "2022-06-16T06:13:42", "updatedOn": "2023-01-27T10:30:01.77"Note the missing "Z".This causes issues when clients try to parse response according to standard. For example an openapi go client generated from your API spec will fail to parse any time field and will throw error on every response that contains such field.Please fix the response implementation.
Reply with quote | Report
Author | Topic: API date-time response is not compliant with RFC3339 |
---|---|
krenakzs Joined: 6/15/2022 |
API date-time response is not compliant with RFC3339 Friday, January 27, 2023 7:49 AM
According to OpenAPI data type "date-time" should be in RFC3339 format (https://swagger.io/docs/specification/data-models/data-types/). Example: 2018-05-08T14:52:11.52Z (Note the "Z" in the end)The current API response truncates the timezone information, meaning the "Z" and everything that should come after it is missing.Example:curl -X GET "https://api.dynu.com/v2/dns" -H "accept: application/json" -H "API-Key: verysecurekey" | jq... "createdOn": "2022-06-16T06:13:42", "updatedOn": "2023-01-27T10:30:01.77"Note the missing "Z".This causes issues when clients try to parse response according to standard. For example an openapi go client generated from your API spec will fail to parse any time field and will throw error on every response that contains such field.Please fix the response implementation.
|
It is currently Wednesday, December 18, 2024 10:03 AM US Mountain Standard Time
Wednesday, December 18, 2024 10:03 AM