#pact #testing #cdc #file-format

pact_models

Pact-Rust support library that provides the core models for dealing with Pact files

74 releases (37 stable)

new 1.2.6 Dec 11, 2024
1.2.5 Nov 12, 2024
1.2.4 Aug 13, 2024
1.2.2 Jul 17, 2024
0.1.0 Jul 23, 2021

#191 in Parser implementations

Download history 1973/week @ 2024-08-21 1365/week @ 2024-08-28 1688/week @ 2024-09-04 1103/week @ 2024-09-11 1364/week @ 2024-09-18 1526/week @ 2024-09-25 1402/week @ 2024-10-02 1116/week @ 2024-10-09 1014/week @ 2024-10-16 1115/week @ 2024-10-23 1042/week @ 2024-10-30 1148/week @ 2024-11-06 1354/week @ 2024-11-13 1034/week @ 2024-11-20 1329/week @ 2024-11-27 899/week @ 2024-12-04

4,922 downloads per month
Used in 16 crates (14 directly)

MIT license

1MB
23K SLoC

Pact Models

This library provides the core models for dealing with Pact files. It supports the V3 pact specification and V4 pact specification.

Online rust docs

Reading and writing Pact files

The Pact struct has methods to read and write pact JSON files. It supports all the specification versions up to V4, but will convert a V1, V1.1 and V2 spec file to a V3 format.

Crate features

All features are enabled by default

  • datetime: Enables support of date and time expressions and generators. This will add the chronos crate as a dependency.
  • xml: Enables support for parsing XML documents. This feature will add the sxd-document crate as a dependency.

lib.rs:

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

Crate features

All features are enabled by default

  • datetime: Enables support of date and time expressions and generators. This will add the chronos crate as a dependency.
  • xml: Enables support for parsing XML documents. This feature will add the sxd-document crate as a dependency.

Dependencies

~9–23MB
~284K SLoC