Is there a good way to make the consumer side gene...
# pact-jvm
j
Is there a good way to make the consumer side generate v2 spec matchers? I'm generating a spec with (Kotlin, sorry for the weird syntax)
Copy code
val pact = ConsumerPactBuilder
   .consumer("Android")
   .pactSpecVersion(PactSpecVersion.V2)
...
    .willRespondWith()
    .status(200)
    .body(
        newJsonObject {
            this.`object`("data") { o ->
                o.integerType("created_at", 1648049202)
            }
        }
    )
I was hoping that setting it to pact spec 2 it would generate (yeah, it's still not quite v2, but go supports the v3 doc, just not the v3 matchers)
Copy code
"$.data.tokens[0].created_at": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "type"
                }
              ]
            },
but instead it's still generating te v3 matcher (which isn't yet supported in go, which is what our producer is written in)
Copy code
"$.data.tokens[0].created_at": {
              "combine": "AND",
              "matchers": [
                {
                  "match": "integer"
                }
              ]
            },
u
Ah, yes. The format will be V2, but it does not filter or change the matchers.
There is a beta version of Pact Go with V3 support
j
I tried running it but it has tons of additional dependencies and one of them was causing issues with our builds. Was hoping coming at it from the consumer side might be a little easier.