Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pactflow/swagger-mock-validator

Package Overview
Dependencies
Maintainers
6
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pactflow/swagger-mock-validator - npm Package Compare versions

Comparing version 11.0.0 to 11.2.0

14

CHANGELOG.md

@@ -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)

12

dist/swagger-mock-validator/mock-parser/pact/pact-parser.js

@@ -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 @@

2

package.json
{
"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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc