swagger-jsdoc
Advanced tools
Comparing version 3.6.0 to 3.7.0
@@ -47,3 +47,3 @@ #!/usr/bin/env node | ||
fs.writeFile(fileName, swaggerSpec, (err) => { | ||
fs.writeFile(fileName, swaggerSpec, err => { | ||
if (err) { | ||
@@ -50,0 +50,0 @@ throw err; |
@@ -12,3 +12,3 @@ const glob = require('glob'); | ||
return globs | ||
.map((globString) => glob.sync(globString)) | ||
.map(globString => glob.sync(globString)) | ||
.reduce((previous, current) => previous.concat(current), []); | ||
@@ -15,0 +15,0 @@ } |
@@ -25,3 +25,3 @@ /* eslint no-self-assign: 0 */ | ||
specification.openapi = specification.openapi; | ||
v3.forEach((property) => { | ||
v3.forEach(property => { | ||
specification[property] = specification[property] || {}; | ||
@@ -31,3 +31,3 @@ }); | ||
specification.swagger = specification.swagger; | ||
v2.forEach((property) => { | ||
v2.forEach(property => { | ||
specification[property] = specification[property] || {}; | ||
@@ -37,3 +37,3 @@ }); | ||
specification.swagger = '2.0'; | ||
v2.forEach((property) => { | ||
v2.forEach(property => { | ||
specification[property] = specification[property] || {}; | ||
@@ -40,0 +40,0 @@ }); |
@@ -20,3 +20,3 @@ const parser = require('swagger-parser'); | ||
toClean.forEach((unnecessaryProp) => { | ||
toClean.forEach(unnecessaryProp => { | ||
if (hasEmptyProperty(improvedSpec[unnecessaryProp])) { | ||
@@ -23,0 +23,0 @@ delete improvedSpec[unnecessaryProp]; |
@@ -8,7 +8,7 @@ /** | ||
return Object.keys(obj) | ||
.map((key) => obj[key]) | ||
.map(key => obj[key]) | ||
.every( | ||
(keyObject) => | ||
keyObject => | ||
typeof keyObject === 'object' && | ||
Object.keys(keyObject).every((key) => !(key in keyObject)) | ||
Object.keys(keyObject).every(key => !(key in keyObject)) | ||
); | ||
@@ -15,0 +15,0 @@ } |
@@ -17,3 +17,3 @@ /** @module index */ | ||
*/ | ||
module.exports = (options) => { | ||
module.exports = options => { | ||
if ((!options.swaggerDefinition || !options.definition) && !options.apis) { | ||
@@ -20,0 +20,0 @@ throw new Error('Provided options are incorrect.'); |
{ | ||
"name": "swagger-jsdoc", | ||
"version": "3.6.0", | ||
"version": "3.7.0", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"license": "MIT", | ||
"description": "Generates swagger doc based on JSDoc", | ||
"main": "index.js", | ||
"scripts": { | ||
"test:lint": "eslint .", | ||
"test:js": "mocha --timeout 10000 --exit", | ||
"start": "node example/v2/app.js", | ||
"test": "run-p test:* -cn" | ||
}, | ||
"bin": { | ||
"swagger-jsdoc": "./bin/swagger-jsdoc.js" | ||
}, | ||
"homepage": "https://github.com/Surnet/swagger-jsdoc", | ||
"repository": { | ||
@@ -27,13 +22,21 @@ "type": "git", | ||
"author": "https://github.com/Surnet/swagger-jsdoc/graphs/contributors", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Surnet/swagger-jsdoc/issues" | ||
}, | ||
"homepage": "https://github.com/Surnet/swagger-jsdoc", | ||
"main": "index.js", | ||
"scripts": { | ||
"test:lint": "eslint .", | ||
"test:js": "mocha --timeout 10000 --exit", | ||
"start": "node example/v2/app.js", | ||
"test": "run-p test:* -cn" | ||
}, | ||
"bin": { | ||
"swagger-jsdoc": "./bin/swagger-jsdoc.js" | ||
}, | ||
"dependencies": { | ||
"commander": "5.0.0", | ||
"commander": "4.0.1", | ||
"doctrine": "3.0.0", | ||
"glob": "7.1.6", | ||
"js-yaml": "3.13.1", | ||
"swagger-parser": "9.0.1" | ||
"swagger-parser": "8.0.4" | ||
}, | ||
@@ -51,7 +54,7 @@ "devDependencies": { | ||
"express": "4.17.1", | ||
"husky": "4.2.3", | ||
"lint-staged": "10.0.8", | ||
"husky": "3.1.0", | ||
"lint-staged": "9.5.0", | ||
"mocha": "7.1.1", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.0.1", | ||
"prettier": "1.19.1", | ||
"supertest": "4.0.2" | ||
@@ -58,0 +61,0 @@ }, |
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
29033
22
+ Addedcommander@4.0.1(transitive)
+ Addedjson-schema-ref-parser@7.1.4(transitive)
+ Addedono@6.0.1(transitive)
+ Addedopenapi-schemas@1.0.3(transitive)
+ Addedswagger-methods@2.0.2(transitive)
+ Addedswagger-parser@8.0.4(transitive)
- Removed@apidevtools/json-schema-ref-parser@8.0.0(transitive)
- Removed@apidevtools/openapi-schemas@2.1.0(transitive)
- Removed@apidevtools/swagger-methods@3.0.2(transitive)
- Removed@apidevtools/swagger-parser@9.0.1(transitive)
- Removed@jsdevtools/ono@7.1.3(transitive)
- Removedcommander@5.0.0(transitive)
- Removedswagger-parser@9.0.1(transitive)
Updatedcommander@4.0.1
Updatedswagger-parser@8.0.4