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

sans-server-swagger

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sans-server-swagger - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

13

bin/test-examples.js

@@ -134,2 +134,3 @@ /**

if (!responseSchema.hasOwnProperty('examples') || !responseSchema.hasOwnProperty('schema')) return;
tests[path][method][response] = {};

@@ -142,3 +143,3 @@ // get enforcer

.forEach(mimeType => {
tests[path][method][mimeType] = function() {
tests[path][method][response][mimeType] = function() {
const example = responseSchema.examples[mimeType];

@@ -158,6 +159,8 @@ enforcer.validate(example);

Object.keys(tests[path]).forEach(method => {
Object.keys(tests[path][method]).forEach(mimeType => {
flat.push({
description: method.toUpperCase() + ' ' + path + ' ' + mimeType,
test: tests[path][method][mimeType]
Object.keys(tests[path][method]).forEach(response => {
Object.keys(tests[path][method][response]).forEach(mimeType => {
flat.push({
description: method.toUpperCase() + ' ' + path + ' ' + mimeType,
test: tests[path][method][mimeType]
});
});

@@ -164,0 +167,0 @@ });

{
"name": "sans-server-swagger",
"version": "0.3.7",
"version": "0.3.8",
"description": "Sans-Server middleware that uses swagger documents to define routes, validate requests, validate responses, and to produce mocks.",

@@ -5,0 +5,0 @@ "main": "index.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