Module pact_models::pact

source ·
Expand description

Traits to represent a Pact

Traits§

  • Trait for a Pact (request/response or message)
  • Trait for objects that can represent Pacts and can be read and written

Functions§

  • Determines the Pact specification version from the metadata of the Pact file
  • Loads a Pact model from a JSON Value
  • Reads the pact file from a URL and parses the resulting JSON into a Pact struct
  • Construct Metadata from JSON value
  • Reads the pact file and parses the resulting JSON into a Pact struct
  • Reads the pact from the file and parses the resulting JSON into a Pact struct
  • Writes the pact out to the provided path. If there is an existing pact at the path, the two pacts will be merged together unless overwrite is true. Returns an error if the file can not be written or the pacts can not be merged.