Pact-jvm: LambdaDSL has no implementation for eachLike with an array of primitives

Created on 12 Dec 2018  路  2Comments  路  Source: pact-foundation/pact-jvm

Currently there is no way to define a variable array of x primitive elements via lambda DSL:

"componentsIds": [
             "A1",
              ...
             "Ax"
           ]

The only alternative is defining a fixed size array:

(LambdaDslObject) category.array("componentsIds", modelOptionIdsArray ->{ 
  modelOptionIdsArray.stringType()
  ...
  modelOptionIdsArray.stringType()
});

But what would really work here would be an eachLike for an array of primitives.

enhancement

Most helpful comment

I've added an eachLike method that supports arrays of primitive values.

All 2 comments

I've added an eachLike method that supports arrays of primitive values.

This has been released with version 3.6.2

Was this page helpful?
0 / 5 - 0 ratings