Skip to content

Commit

Permalink
fix: LambdaDslJsonArray has no datetime function #1839
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Dec 3, 2024
1 parent c791170 commit 147a2a6
Showing 1 changed file with 44 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ public LambdaDslJsonArray time(final String format, final Date example) {
*/
@Deprecated
public LambdaDslJsonArray timestamp() {
pactArray.datetime();
return this;
return datetime();
}

/**
Expand All @@ -316,8 +315,7 @@ public LambdaDslJsonArray timestamp() {
*/
@Deprecated
public LambdaDslJsonArray timestamp(final String format) {
pactArray.datetime(format);
return this;
return datetime(format);
}

/**
Expand All @@ -329,8 +327,7 @@ public LambdaDslJsonArray timestamp(final String format) {
*/
@Deprecated
public LambdaDslJsonArray timestamp(final String format, final Date example) {
pactArray.datetime(format, example);
return this;
return datetime(format, example);
}

/**
Expand All @@ -342,10 +339,49 @@ public LambdaDslJsonArray timestamp(final String format, final Date example) {
*/
@Deprecated
public LambdaDslJsonArray timestamp(final String format, final Instant example) {
pactArray.datetime(format, example);
return this;
return datetime(format, example);
}

/**
* Element that must be an ISO formatted date/time
*/
public LambdaDslJsonArray datetime() {
pactArray.datetime();
return this;
}

/**
* Element that must match the given date/time format
*
* @param format date/time format
*/
public LambdaDslJsonArray datetime(final String format) {
pactArray.datetime(format);
return this;
}

/**
* Element that must match the given date/time format
*
* @param format date/time format
* @param example example date and time to use for generated bodies
*/
public LambdaDslJsonArray datetime(final String format, final Date example) {
pactArray.datetime(format, example);
return this;
}

/**
* Element that must match the given date/time format
*
* @param format date/time format
* @param example example date and time to use for generated bodies
*/
public LambdaDslJsonArray datetime(final String format, final Instant example) {
pactArray.datetime(format, example);
return this;
}

/**
* Element that must be a numeric identifier
*/
Expand Down

0 comments on commit 147a2a6

Please sign in to comment.