Socket
Socket
Sign inDemoInstall

apidoc

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apidoc - npm Package Compare versions

Comparing version 0.27.1 to 0.28.0

6

CHANGELOG.md
# apiDoc Changelog
### 0.28.0
* Use npm lockfile v2
* Update handlebar to fix vulnerability (#962)
* Fix runtime error in single page template (#944 via #945 by Ashlanfox)
* Implement apiBody parsing into multi page template (#953 by Seth Wheeler)
### 0.27.0

@@ -4,0 +10,0 @@ * Maintain comment order for @apiParam and @apiSuccess (fix #206 via #951 by Matheus Giovani)

4

package.json
{
"name": "apidoc",
"version": "0.27.1",
"version": "0.28.0",
"description": "RESTful web API Documentation Generator",

@@ -39,3 +39,3 @@ "author": "Peter Rottmann <rottmann@inveris.de>",

"fs-extra": "^9.0.1",
"handlebars": "^4.7.6",
"handlebars": "^4.7.7",
"lodash": "^4.17.20",

@@ -42,0 +42,0 @@ "markdown-it": "^11.0.0",

@@ -217,2 +217,42 @@ define([

*/
Handlebars.registerHelper('gen_body', function(context, options) {
let strBody = {};
context.forEach(element => {
element.field = element.field.replace("]", "");
switch (element.type.toLowerCase()) {
case "string":
if (element.field.includes('[')) {
if (strBody[element.field.split("[")[0]] === undefined) {
strBody[element.field.split("[")[0]] = {};
}
strBody[element.field.split("[")[0]][element.field.split("[")[1]] = (element.defaultValue || "");
break;
}
strBody[element.field] = (element.defaultValue || "");
break;
case "number":
if (element.field.includes('[')) {
if (strBody[element.field.split("[")[0]] === undefined) {
strBody[element.field.split("[")[0]] = {};
}
strBody[element.field.split("[")[0]][element.field.split("[")[1]] = (element.defaultValue || 0);
break;
}
strBody[element.field] = (element.defaultValue || 0);
break;
case "object":
if (strBody[element.field] === undefined) {
strBody[element.field] = {};
}
break;
default:
strBody[element.field] = null;
}
});
return JSON.stringify(strBody, null, 4);
});
/**
*
*/
Handlebars.registerHelper('each_compare_field', function(source, compare, options) {

@@ -219,0 +259,0 @@ return _handlebarsEachCompared('field', source, compare, options);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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