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

swagger-schema

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-schema - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

spec.js

6

environment.js

@@ -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+$/)) {

2

fixtures/pet.json

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

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