hi, is there any example of pact jvm v4 dsl versus...
# pact-jvm
t
hi, is there any example of pact jvm v4 dsl versus v3 dsl, seems like a lot of v3 stuff (e.g.
builder.given()...
) no longer is applied in the same way in V4 ? looking for example for setting consumer side expectations
n
Copy code
@Pact(consumer = CONSUMER_NAME)
    public V4Pact getOrderById(PactBuilder builder) {
        return builder
                .usingLegacyDsl() // Here
                .given("An order exists")
I fell back to using the legacyDsl() but also would be interested in some example whether should use v4 for http pacts? Or is it more for the plugins?
t
ye, i also saw that
useLegacyDsl
as well as specifying to explicitly use V3 spec, but would love to see a proper V4 DSL example 🙂
👍 1
u
The legacy V3 DSL can create V4 Pacts. Most of the functionality should be supported.
Some things that can't be done is things like have both a HTTP and message interaction in the same Pact file but with different tests.