API date-time response is...
API date-time response is not compliant with RFC3339
- 主页
- 后台控制中心
- 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: 2022/6/15 |
API date-time response is not compliant with RFC3339 2023年1月27日 7:49
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 2024年11月15日 2:45 US Mountain Standard Time
2024年11月15日 2:45