-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Incorrect date format when in response object #2680
Comments
That's what 'date' is defined as. If you need it to be in a |
@webron, I tried that using writing annotations
I'm getting the same output as above. Am I missing something? |
Which version of swagger-core do you use? |
Bump: this is also showing up in the Steps to reproduce
Suggested fixIn my opinion, either |
ref swagger-api/swagger-core#2680 - configure date in jersey jackson mapper
in Swagger Core 2.x there are a few alternatives (sample has been updated with option 3):
closing ticket, please reopen if you're still experiencing issues |
Thanks! Please consider making that default behaviour. |
Demonstration API definition
From my API I'm returning a DTO which looks like below
If I look on the swagger UI, I see this
Here, the actual response sent by the server is in long format (number of milliseconds since 1970). But the swagger is showing Date format as
"ModifiedOn": "2018-02-20T17:23:58.907Z"
. Which is kind of misleading.Expected Behavior
"ModifiedOn": "1519147559685"
Or something like this
The text was updated successfully, but these errors were encountered: