Crate pact_models

source ·
Expand description

The pact_models crate provides all the structs and traits required to model a Pact.

Modules

Module for handling interaction content (bodies)
Module for handling content types
expression parser for generator expressions
Functions for dealing with file locks while reading/writing pact files
generators module includes all the classes to deal with V3/V4 spec generators
HTTP parts of a Request/Response interaction
Module for fetching documents via HTTP
Models for Pact interactions
Collection of utilities for working with JSON
matchingrules module includes all the classes to deal with V3/V4 spec matchers
The message module provides all functionality to deal with message interactions.
The message_pact module defines a Pact that contains Messages instead of Interactions.
Traits to represent a Pact
Functions for dealing with path expressions
Models to support plugins
A “prelude” or a default list of import types to include.
provider_states module contains all the logic for dealing with provider states. See https://docs.pact.io/getting_started/provider_states for more info on provider states.
Structs to model an HTTP request
Models for synchronous request/response interactions
Synchronous HTTP Request/Response Pact
Utilities for dealing with time and date values. These are based on the Java DateTimeFormatter
V4 specification models
Module for verifying the state of the Pact JSON (file format verification)
Collection of utilities for working with XML

Macros

Macro to make constructing generators easy Example usage:
Macro to ease constructing matching rules Example usage:
Macro to ease constructing matching rules Example usage:

Structs

Struct that defines the consumer of the pact.
Struct that defines a provider of a pact.

Enums

Enumeration of the types of differences between requests and responses
Enum that defines the different types of HTTP statuses
Enum defining the pact specification versions supported by the library

Constants

Version of the library