@pactflow/swagger-mock-validator
Advanced tools
Comparing version 11.0.0 to 11.2.0
@@ -0,1 +1,15 @@ | ||
<a name="11.2.0"></a> | ||
# [11.2.0](https://github.com/pactflow/swagger-mock-validator/compare/11.1.0...11.2.0) (2022-06-14) | ||
# [11.1.0](https://github.com/pactflow/swagger-mock-validator/compare/11.0.0...11.1.0) (2022-06-14) | ||
### Bug Fixes | ||
* Convert pact spec 3 headers to v1 format ([a0584b0](https://github.com/pactflow/swagger-mock-validator/commit/a0584b0590a5a857cb1bfa302595e892aee781ab)) | ||
<a name="11.0.0"></a> | ||
@@ -2,0 +16,0 @@ # [11.0.0](https://github.com/pactflow/swagger-mock-validator/compare/10.3.0...11.0.0) (2022-04-22) |
@@ -24,2 +24,10 @@ "use strict"; | ||
}; | ||
const parseHeaders = (headers, location, parentInteraction) => { | ||
for (const key in headers) { | ||
if (typeof headers[key] !== 'string') { | ||
headers[key] = headers[key].toString(); | ||
} | ||
} | ||
return parseValues(headers, location, parentInteraction); | ||
}; | ||
const isPactV1RequestQuery = (query) => typeof query === 'string'; | ||
@@ -80,3 +88,3 @@ const parseAsPactV1RequestQuery = (requestQuery) => { | ||
}; | ||
parsedInteraction.requestHeaders = parseValues(interaction.request.headers, `${parsedInteraction.location}.request.headers`, parsedInteraction); | ||
parsedInteraction.requestHeaders = parseHeaders(interaction.request.headers, `${parsedInteraction.location}.request.headers`, parsedInteraction); | ||
parsedInteraction.requestMethod = { | ||
@@ -99,3 +107,3 @@ location: `${parsedInteraction.location}.request.method`, | ||
}; | ||
parsedInteraction.responseHeaders = parseValues(interaction.response.headers, `${parsedInteraction.location}.response.headers`, parsedInteraction); | ||
parsedInteraction.responseHeaders = parseHeaders(interaction.response.headers, `${parsedInteraction.location}.response.headers`, parsedInteraction); | ||
parsedInteraction.responseStatus = { | ||
@@ -102,0 +110,0 @@ location: `${parsedInteraction.location}.response.status`, |
@@ -58,2 +58,11 @@ # Contributing | ||
### Run progam locally | ||
To run the compiled development code locally change to the bin directory and run the swagger-mock-validator-local app via node. This compiled version preserves any console logs for development purposes. | ||
``` | ||
cd bin | ||
node swagger-mock-validator-local <example_swagger_json> <example_pactfile_json> --outputDepth 5 | ||
``` | ||
## Releasing a new version | ||
@@ -60,0 +69,0 @@ |
{ | ||
"name": "@pactflow/swagger-mock-validator", | ||
"version": "11.0.0", | ||
"version": "11.2.0", | ||
"description": "A CLI tool to validate mocks against swagger/OpenApi specs.", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208013
2920