Chris Godsey
11/10/2022, 9:04 PM2022-11-10T20:49:15.773684Z DEBUG ThreadId(01) verify_interaction{interaction="a request with a country code exactly three characters long"}: pact_matching::json: compare_values: Comparing 'Number(1)' to 'Number(1)' at path '$.totalPages' -> Ok(())
thread '<unnamed>' panicked at 'index out of bounds: the len is 1 but the index is 1', pact_matching\src\<http://headers.rs:22:45|headers.rs:22:45>
note: run with `RUST_BACKTRACE=1` environment variable to display a backtraceTimothy Jones
11/10/2022, 9:09 PMChris Godsey
11/10/2022, 9:10 PMTimothy Jones
11/10/2022, 9:11 PMTimothy Jones
11/10/2022, 9:11 PMTimothy Jones
11/10/2022, 9:12 PMChris Godsey
11/10/2022, 9:15 PMTimothy Jones
11/10/2022, 9:15 PMChris Godsey
11/10/2022, 9:16 PM{
"consumer": {
"name": "RestLegalService"
},
"interactions": [
{
"description": "a request with a country code exactly three characters long",
"request": {
"body": {
"countryCode": "GBR"
},
"headers": {
"Content-Type": "application/json"
},
"matchingRules": {
"body": {
"$.countryCode": {
"combine": "AND",
"matchers": [
{
"match": "regex",
"regex": "^.{3}$"
}
]
}
},
"header": {}
},
"method": "POST",
"path": "/rpc/service/rpc/LegalService/queryDocumentMetadata"
},
"response": {
"body": {
"documentMetadata": [
{
"documentId": "cccccccc-eeee-dddd-ffff-gggggggggggg",
"localizedNames": [],
"revisionId": 111111
}
],
"pageNumber": 1,
"pageSize": 1,
"totalPages": 1
},
"headers": {
"Content-Type": "application/json;"
},
"matchingRules": {
"body": {
"$.documentMetadata": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.documentMetadata[*].documentId": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.documentMetadata[*].localizedNames": {
"combine": "AND",
"matchers": [
{
"match": "type"
}
]
},
"$.documentMetadata[*].revisionId": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
},
"$.pageNumber": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
},
"$.pageSize": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
},
"$.totalPages": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
}
},
"header": {}
},
"status": 200
}
}
],
"metadata": {
"pact-js": {
"version": "10.1.4"
},
"pactRust": {
"ffi": "0.3.12",
"models": "0.4.5"
},
"pactSpecification": {
"version": "3.0.0"
}
},
"provider": {
"name": "RPCLegalService"
}
}Chris Godsey
11/10/2022, 9:18 PMChris Godsey
11/10/2022, 9:18 PMChris Godsey
11/10/2022, 9:20 PMChris Godsey
11/10/2022, 9:24 PMTimothy Jones
11/10/2022, 9:29 PMChris Godsey
11/10/2022, 9:30 PMTimothy Jones
11/10/2022, 9:30 PMChris Godsey
11/10/2022, 9:32 PMChris Godsey
11/10/2022, 9:32 PMTimothy Jones
11/10/2022, 9:35 PMChris Godsey
11/10/2022, 9:35 PMTimothy Jones
11/10/2022, 9:35 PMTimothy Jones
11/10/2022, 9:35 PM"application/json;"Timothy Jones
11/10/2022, 9:36 PM; in your consumer testTimothy Jones
11/10/2022, 9:36 PMChris Godsey
11/10/2022, 9:36 PMChris Godsey
11/10/2022, 9:36 PMChris Godsey
11/10/2022, 9:40 PMTimothy Jones
11/10/2022, 9:41 PMapplication/json;
is valid:
https://httpwg.org/specs/rfc9110.html#rule.parameterTimothy Jones
11/10/2022, 9:44 PMI appreciate the help.You're welcome! Thanks for the report!
Chris Godsey
11/10/2022, 9:48 PMMatt (pactflow.io / pact-js / pact-go)