sans-server-swagger
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -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", |
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
170981
2838