Skip to content

How to tell to use format="date" instead of format="date-time" #202

Closed Answered by CarstenWickner
CathKilroy asked this question in Q&A
Discussion options

You must be logged in to vote

HI @CathKilroy,

The default behavior you're describing comes from a combination of the following two standard Options in your setup:

  • Option.ADDITIONAL_FIXED_TYPES
  • Option.EXTRA_OPEN_API_FORMAT_VALUES

The "date-time" value is defined here, since the Date class contains also a time portion:

Stream.of(java.time.LocalDateTime.class, java.time.LocalTime.class, java.time.ZonedDateTime.class,
java.time.OffsetDateTime.class, java.time.OffsetTime.class, java.time.Instant.class,
java.util.Date.class, java.util.Calendar.class

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CarstenWickner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants