Skip to content

Type for "date-time" property is displayed as "string" Instead of "date" even after setting the dataType attribute #3286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
naveenkavuri opened this issue Jun 23, 2017 · 7 comments

Comments

@naveenkavuri
Copy link

naveenkavuri commented Jun 23, 2017

Hi,

The JSON rendered from Swagger UI displays the type for date-time property as "string". Swagger Documentation states that the type has to be String and doesn't have a special way of showing 'dates' but is there anyway possible that we can change the type from "string" to "date".I have tried hard-coding the type using annotation #@ApiModelProperty(dataType="date") but it didn't work. Is there anyway that we can display the type as "date" instead of "string", and generate default values? Any suggestion for this ?
The comments for the tickets on the same issue #1183 & #462 states that it would be solved in the next version. Can someone let me know if this is resolved ,if yes please let me know the version.

@webron
Copy link
Contributor

webron commented Jun 23, 2017

It's not yet supported in the new UI.

@naveenkavuri
Copy link
Author

@webron thanks for the response. When can we expect a new version with the update ?

@webron
Copy link
Contributor

webron commented Jun 23, 2017

No ETA. To set expectations - this is not something we're going to work on soon, but we'll review PRs that add support for it.

@Preethiy
Copy link

This would be a useful feature since not all dates include the time format.

@jorgerod
Copy link

jorgerod commented Nov 4, 2019

Any news about this feature?

@IanKemp
Copy link

IanKemp commented Jul 13, 2020

Holy hell in a handbasket, how is this not supported yet?

At the very least, setting the datatype label to read "date" or "date-time" and specifying a format mask on the input field as per RFC 3339 would go 90% of the way to implementing this feature.

@mvillafuertem
Copy link

Any news about this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants