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

open-api-mocker

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-api-mocker - npm Package Compare versions

Comparing version 1.2.5 to 1.3.0

7

CHANGELOG.md

@@ -9,2 +9,9 @@ # Changelog

## [1.3.0] - 2020-04-05
### Added
- Support for strings in schemas with format `"password"`
### Fixed
- Empty response bodies are now handled properly
## [1.2.5] - 2020-03-26

@@ -11,0 +18,0 @@ ### Fixed

6

lib/paths/path.js

@@ -223,3 +223,3 @@ 'use strict';

headers: headers && this.generateResponseHeaders(headers),
body: ResponseGenerator.generate(schema)
body: schema ? ResponseGenerator.generate(schema) : null
};

@@ -237,3 +237,3 @@ }

const [responseContent] = Object.values(preferredResponse.content);
const [responseContent] = Object.values(preferredResponse.content || {});

@@ -246,3 +246,3 @@ return { statusCode, schema: responseContent, headers: preferredResponse.headers };

const [[statusCode, firstResponse]] = Object.entries(this.responses);
const [firstResponseContent] = Object.values(firstResponse.content);
const [firstResponseContent] = Object.values(firstResponse.content || {});

@@ -249,0 +249,0 @@ return { statusCode, schema: firstResponseContent, headers: firstResponse.headers };

@@ -5,3 +5,3 @@ 'use strict';

const ajv = new Ajv();
const ajv = new Ajv({ unknownFormats: ['password'] });

@@ -8,0 +8,0 @@ class SchemaValidator {

{
"name": "open-api-mocker",
"version": "1.2.5",
"version": "1.3.0",
"description": "A mock server based in Open API Specification",

@@ -5,0 +5,0 @@ "main": "lib/open-api-mocker.js",

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