Skip to content

Commit

Permalink
Fix: Use ISO date format for random JSON property values (OpenAPI) (c…
Browse files Browse the repository at this point in the history
…itrusframework#1167)

* fix: use ISO date format for random JSON property values

* Remove @author tag

---------

Co-authored-by: Ralf Ueberfuhr <[email protected]>
  • Loading branch information
ueberfuhr and Ralf Ueberfuhr authored May 30, 2024
1 parent acf1a91 commit 0b2cb61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static String createRandomValueExpression(OasSchema schema, Map<String, O
}

if (schema.format != null && schema.format.equals("date")) {
payload.append("citrus:currentDate()");
payload.append("citrus:currentDate('yyyy-MM-dd')");
} else if (schema.format != null && schema.format.equals("date-time")) {
payload.append("citrus:currentDate('yyyy-MM-dd'T'hh:mm:ss')");
} else if (StringUtils.hasText(schema.pattern)) {
Expand Down

0 comments on commit 0b2cb61

Please sign in to comment.