Module pact

Module pact 

Source
Expand description

Traits to represent a Pact

Traits§

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

Functions§

determine_spec_version
Determines the Pact specification version from the metadata of the Pact file
load_pact_from_json
Loads a Pact model from a JSON Value
load_pact_from_url
Reads the pact file from a URL and parses the resulting JSON into a Pact struct
parse_meta_data
Construct Metadata from JSON value
read_pact
Reads the pact file and parses the resulting JSON into a Pact struct
read_pact_from_file
Reads the pact from the file and parses the resulting JSON into a Pact struct
write_pact
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.