diff --git a/consumer/src/main/java/au/com/dius/pact/consumer/dsl/LambdaDslObject.java b/consumer/src/main/java/au/com/dius/pact/consumer/dsl/LambdaDslObject.java index 9f9e4b41f..6abd1f16e 100644 --- a/consumer/src/main/java/au/com/dius/pact/consumer/dsl/LambdaDslObject.java +++ b/consumer/src/main/java/au/com/dius/pact/consumer/dsl/LambdaDslObject.java @@ -579,6 +579,17 @@ public LambdaDslObject array(final String name, final Consumer 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 *