Best way to denote time (without date) in Swagger spec

徘徊边缘 提交于 2019-12-01 11:51:53

Depending on what you're trying to represent, this may or may not be a good idea.

If you want to represent a specific timestamp, then it's probably much safer to include the date.

If the date really isn't important (eg. you want to indicate that an event takes place at 14:00 every day), then I don't believe swagger has a built in format for that. However, the swagger format field is open and swagger has support for ECMA 262 regex string patterns.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!