Hey there :wave: is there any way to state in a co...
# general
j
Hey there 👋 is there any way to state in a contract that a field cannot be null (rather than is not null)? We have an integration where the provider started to return a field as null (where it wasn’t previously able to) and it broke the existing integration - the team is asking if there’s any way to handle this using contract testing My gut feeling says no but thought I’d ask the experts 😄
r
That's the default behaviour. If you define a field in the Pact, it cannot be null.
With V4 Pacts, there is a
notEmpty
matcher to make it more explicit.
j
Nice one thanks for that 👍 I’ll take a look