How to tell to use format="date" instead of format="date-time" #202
-
Hi I am using version 4.16.0. In this version the standard format for Date objects, is "date-time". How can I tell the tool to us "date" instead? Br Casper |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
HI @CathKilroy, The default behavior you're describing comes from a combination of the following two standard
The You have a few alternatives here. The simplest ones would be: 1. Keep your setup as-is and override the
|
Beta Was this translation helpful? Give feedback.
HI @CathKilroy,
The default behavior you're describing comes from a combination of the following two standard
Option
s in your setup:Option.ADDITIONAL_FIXED_TYPES
Option.EXTRA_OPEN_API_FORMAT_VALUES
The
"date-time"
value is defined here, since theDate
class contains also a time portion:jsonschema-generator/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimpleTypeModule.java
Lines 85 to 88 in dc4662a