swagger-schema
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -13,4 +13,2 @@ /** | ||
var v4 = require('./data/draft-04-schema'); | ||
/** | ||
@@ -34,6 +32,2 @@ * Initialize a new `Environment`. | ||
Environment.prototype.setupValidation = function() { | ||
this.schemas.forEach(function(env) { | ||
env.addSchema('http://json-schema.org/draft-04/schema', v4); | ||
}); | ||
this.coerceSchema.addTypeCoercion('integer', function(v) { | ||
@@ -40,0 +34,0 @@ if (typeof v === 'string' && v.match(/^\-?\d+$/)) { |
@@ -197,3 +197,3 @@ { | ||
"name": "file", | ||
"paramType": "body", | ||
"paramType": "form", | ||
"required": false, | ||
@@ -200,0 +200,0 @@ "type": "File" |
{ | ||
"name": "swagger-schema", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Swagger schema helpers", | ||
@@ -11,6 +11,8 @@ "dependencies": { | ||
"jscs": "1.2.4", | ||
"jshint": "2.4.4" | ||
"jshint": "2.4.4", | ||
"mocha": "1.17.1", | ||
"should": "3.1.2" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/.bin/jshint . && ./node_modules/.bin/jscs ." | ||
"test": "./node_modules/.bin/jshint . && ./node_modules/.bin/jscs . && ./node_modules/.bin/mocha --recursive --require should" | ||
}, | ||
@@ -17,0 +19,0 @@ "main": "index", |
@@ -1,2 +0,2 @@ | ||
# Swagger Schema [![Build Status](https://travis-ci.org/silas/swagger-schema.png?branch=master)](https://travis-ci.org/silas/swagger-schema) | ||
# Swagger Schema | ||
@@ -3,0 +3,0 @@ This is a helper library for [Swagger Framework][framework] and [Swagger Agent][agent]. |
@@ -133,3 +133,5 @@ /** | ||
property.$ref = parameter.type; | ||
delete property.type; | ||
lodash.keys(property).forEach(function(key) { | ||
if (key !== '$ref') delete property[key]; | ||
}); | ||
} else { | ||
@@ -136,0 +138,0 @@ throw new Error('unknown type: ' + parameter.type); |
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45
1940
0
56896
4
2