We would like to implement Pact V3 Specification support for Pact Ruby
Current status
Required V4 Features
Generators
Matchers
Multiple interaction types
Synchronous/HTTP
Synchronous/Message (not currently available in pact-message-ruby)
Asynchronous/Message
Pact Plugin support
Implementation notes
Strong consideration should be made for incorporating pact_ffi functionality (see Pact FFI Tracking Issue #317 ) rather than re-implementing in ruby
Validation
The pact-compatibility-suite should be considered for cross language validation
Tests should be added to showcase new features
V4 Related Issues
Will be tagging and closing related v3/v4 issues, and linking to this meta issue
V4 Matchers
matcher
Spec Version
example configuration
description
ArrayContains
V4
{ "match": "arrayContains", "variants": [...] }
Checks if all the variants are present in an array.
StatusCode
V4
{ "match": "statusCode", "status": "success" }
Matches the response status code.
NotEmpty
V4
{ "match": "notEmpty" }
Value must be present and not empty (not null or the empty string)
Semver
V4
{ "match": "semver" }
Value must be valid based on the semver specification
EachKey
V4
{ "match": "eachKey", "rules": [{"match": "regex", "regex": "\\$(\\.\\w+)+"}], "value": "$.test.one" }
Allows defining matching rules to apply to the keys in a map
EachValue
V4
{ "match": "eachValue", "rules": [{"match": "regex", "regex": "\\$(\\.\\w+)+"}], "value": "$.test.one" }
Allows defining matching rules to apply to the values in a collection. For maps, delgates to the Values matcher.
V4 Generators
matcher
Spec Version
example configuration
description
ProviderState
V4
{"expression": "/api/user/${id}", type": "ProviderState"}
Generates a value that is looked up from the provider state context using the given expression
MockServerURL
V4
{"regex": ".*\\/(orders\\/\\d+)$", "example": "http://localhost:1234/orders/5678", type": "MockServerURL"}
Generates a URL with the mock server as the base URL.
We would like to implement Pact V3 Specification support for Pact Ruby
Current status
Required V4 Features
Implementation notes
Validation
V4 Related Issues
V4 Matchers
{ "match": "arrayContains", "variants": [...] }{ "match": "statusCode", "status": "success" }{ "match": "notEmpty" }{ "match": "semver" }{ "match": "eachKey", "rules": [{"match": "regex", "regex": "\\$(\\.\\w+)+"}], "value": "$.test.one" }{ "match": "eachValue", "rules": [{"match": "regex", "regex": "\\$(\\.\\w+)+"}], "value": "$.test.one" }V4 Generators
{"expression": "/api/user/${id}", type": "ProviderState"}{"regex": ".*\\/(orders\\/\\d+)$", "example": "http://localhost:1234/orders/5678", type": "MockServerURL"}