date format condition added

This commit is contained in:
Elena Bobkova 2019-07-22 13:26:15 +03:00
parent 0adb5c1ebe
commit b97fb00ea4
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,9 @@
{%- if field.type.type.baseTypeName == "DateTime" %}
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "{{ utils.getDateFormat(field) }}", timezone = "utc")
{%- endif %}
{%- if field.type.type.baseTypeName == "Date" %}
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "{{ utils.getDateFormat(field) }}")
{%- endif %}
{%- if field.nullable %}
@JsonInclude(JsonInclude.Include.ALWAYS)
{%- elseif field.optional %}