-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Hi,
Apparently pact-ruby-standalone does not use the standard header path format of $.header.<header name> when parsing pact files. Instead the non-standard format $.headers.<header name> is used (notice the extra s). This leads to incompatibility with pact-jvm (as mentioned in e.g. pact-foundation/pact-net#184 (comment)) which generates the paths according to the pact specification.
Here's the relevant part of the pact specification:
Matcher Path expressions
Pact does not support the full JSON path expressions, only ones that match the following rules:
- All paths start with a dollar ($), representing the root.
- All path elements are either separated by periods (.) or use the JSON path bracket notation (square brackets and single quotes around the values: e.g. ['x.y']), except array indices which use square brackets ([]). For elements where the value contains white space or non-alphanumeric characters, the JSON path bracket notation (['']) should be used.
- The second element of the path is the http type that the matcher is applied to (e.g.,
$.body or $ .header).- Path elements represent keys.
- A star (*) can be used to match all keys of a map or all items of an array (one level only).
Metadata
Metadata
Assignees
Labels
No labels