Skip to content

Loose checking of HTTP status range #68

Closed
@broeser

Description

@broeser

Software versions

  • Consumer Pact library: e.g. Pact JS v9.8.1
  • Provider Pact library: e.g. pact-jvm-provider-junit5-spring v 4.0.8
  • Node Version: 10.16.0

Expected behaviour

As the documentation states, "You want to be as loose as possible with the matching for the response […]" (https://docs.pact.io/getting_started/matching)

Is there a way to loosely match HTTP status codes, e.g. match on 2xx ? In our case it doesn't matter much for the consumers whether it's OK, ACCEPTED or NO CONTENT, however it matters a lot whether e.g. 2xx or 4xx is returned.

Actual behaviour

We could only find exact matching on a certain status code or no matching at all.

Notes

I hope this is the right project to log this, or is this a pact specification issue? Our company is pretty new to pact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions