Skip to content

Commit

Permalink
feat(consumer-dsl): Support object and array expectation without spec…
Browse files Browse the repository at this point in the history
…ifying consumer in LambdaDSL #1737
  • Loading branch information
rholshausen committed Apr 22, 2024
1 parent fa6714c commit bd1d739
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,17 @@ public LambdaDslObject array(final String name, final Consumer<LambdaDslJsonArra
return this;
}

/**
* Attribute that is an array. This will accept any array, including an empty one. If you need to configure the
* array, use the method that takes a consumer.
*
* @param name field name
*/
public LambdaDslObject array(final String name) {
object.array(name).closeArray();
return this;
}

/**
* Attribute that is a JSON object
*
Expand All @@ -592,6 +603,17 @@ public LambdaDslObject object(final String name, final Consumer<LambdaDslObject>
return this;
}

/**
* Attribute that is a JSON object. This will accept any JSON object, including an empty one. If you need to
* configure the object, use the method that takes a consumer.
*
* @param name field name
*/
public LambdaDslObject object(final String name) {
object.object(name).closeObject();
return this;
}

/**
* Attribute that is an array where each item must match the following example
*
Expand Down

0 comments on commit bd1d739

Please sign in to comment.