Crate pact_matching [] [src]

The pact_matching crate provides the core logic to performing matching on HTTP requests and responses. It implements the V1.1 Pact specification (https://github.com/pact-foundation/pact-specification/tree/version-1.1).

Modules

json

The json module provides functions to compare and display the differences between JSON bodies

models

The models module provides all the structures required to model a Pact.

Macros

s

Simple macro to convert a string slice to a String struct.

Enums

DiffConfig

Enum that defines the configuration options for performing a match.

Mismatch

Enum that defines the different types of mismatches that can occur.

Functions

match_body

Matches the actual body to the expected one. This takes into account the content type of each.

match_headers

Matches the actual headers to the expected ones.

match_method

Matches the actual request method to the expected one.

match_path

Matches the actual request path to the expected one.

match_query

Matches the actual query parameters to the expected ones.

match_request

Matches the expected and actual requests.

match_response

Matches the actual and expected responses.

match_status

Matches the actual response status to the expected one.

match_text

Matches the actual text body to the expected one.