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.9.0 to 0.9.1

spec/resourceListing.json

2

environment.js

@@ -55,3 +55,3 @@ /**

this.env.addTypeCoercion('number', function(v) {
if (typeof v === 'string' && v.match(/^(\d+|\d*\.\d+|\d+\.\d*)$/)) {
if (typeof v === 'string' && v.match(/^\-?(\d+|\d*\.\d+|\d+\.\d*)$/)) {
return parseFloat(v);

@@ -58,0 +58,0 @@ }

{
"name": "swagger-schema",
"version": "0.9.0",
"version": "0.9.1",
"description": "Swagger schema helpers",

@@ -5,0 +5,0 @@ "dependencies": {

# Swagger Schema
This is a helper library for [Swagger Framework][framework] and [Swagger Agent][agent].
This is a helper library for [Swagger Framework][framework].

@@ -9,3 +9,2 @@ ## License

[agent]: https://github.com/silas/swagger-agent
[framework]: https://github.com/silas/swagger-framework

@@ -31,3 +31,16 @@ 'use strict';

});
it('should convert negative number', function() {
var schema = {
type: 'object',
properties: { one: { type: 'number' } },
};
var number = -23.5;
var data = { one: '' + number };
this.env.validateThrow(schema, data, { coerce: true });
data.one.should.equal(number);
});
});
});
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