swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Show format when viewing model.

Open x12a1f opened this issue 11 years ago • 5 comments

Is it possible to show the format of a field in the model of an object? For instance, shipDate is of type string and has its format set to date-time. It would be nice if the model can show something like (string: date-time, optional) instead of just (string, optional).

I am referring to this: selection_106

x12a1f avatar Apr 23 '15 11:04 x12a1f

I think it's a good idea. This model is generated by the code from the swagger-js project. @webron, @fehguy: let's move this issue into the swagger-js so, I could implement this feature

iushankin avatar Apr 23 '15 16:04 iushankin

for date-time, this might be related: https://github.com/swagger-api/swagger-ui/issues/1183

zyro23 avatar Apr 23 '15 18:04 zyro23

It's also related to https://github.com/swagger-api/swagger-js/issues/219.

webron avatar Apr 24 '15 10:04 webron

Just to be explicit, it would be useful to display any format, not just special ones. For example, if I have type: string, format: foo it should show (string: foo, optional)

yzatslinear avatar Apr 29 '15 18:04 yzatslinear

see parent issue, #1248

fehguy avatar May 08 '15 21:05 fehguy