Socket
Socket
Sign inDemoInstall

swagger-tools

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-tools - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

17

index.js

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

var docsUrl;
var primitives;
var schemasUrl;

@@ -62,2 +63,14 @@

docsUrl = 'https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md';
// Manually maintained list due to the related JSON Schema files not being complete or used
primitives = [
'integer',
'long',
'float',
'double',
'string',
'byte',
'boolean',
'date',
'dateTime'
];
schemasUrl = 'https://github.com/wordnik/swagger-spec/tree/master/schemas/v1.2';

@@ -72,2 +85,3 @@

this.options = options;
this.primitives = primitives;
this.schemasUrl = schemasUrl;

@@ -170,4 +184,3 @@ this.version = version;

var modelRefs = {};
var primitives = _.union(spec.schemas['dataType.json'].definitions.primitiveType.properties.type.enum,
['array', 'void', 'File']);
var primitives = _.union(spec.primitives, ['array', 'void', 'File']);
var addModelRef = function (modelId, modelRef) {

@@ -174,0 +187,0 @@ if (Object.keys(modelRefs).indexOf(modelId) === -1) {

2

package.json
{
"name": "swagger-tools",
"version": "0.1.2",
"version": "0.1.3",
"description": "Various tools for using and integrating with Swagger.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,3 +54,3 @@ /* global describe, it */

describe('metadata', function () {
it('should have proper docsUrl, options, schemasUrl and verison properties', function () {
it('should have proper docsUrl, primitives, options, schemasUrl and verison properties', function () {
assert.deepEqual(spec.options, {

@@ -65,2 +65,13 @@ validator: {

assert.strictEqual(spec.docsUrl, 'https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md');
assert.deepEqual(spec.primitives, [
'integer',
'long',
'float',
'double',
'string',
'byte',
'boolean',
'date',
'dateTime'
]);
assert.strictEqual(spec.schemasUrl, 'https://github.com/wordnik/swagger-spec/tree/master/schemas/v1.2');

@@ -67,0 +78,0 @@ assert.strictEqual(spec.version, '1.2');

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