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.6.1 to 0.6.2

test/fixtures/example/escape.js

7

CHANGELOG.md
# apiDoc Changelog
#### 0.6.2
Bugfix: Docs do not generate without optional @api [title]. (https://github.com/apidoc/apidoc/issues/82)
Bugfix: Escape example output in `apiExample`, `apiErrorExample`, `apiSuccessExample`. (https://github.com/apidoc/apidoc/issues/78)
#### 0.6.1

@@ -4,0 +11,0 @@

8

lib/apidoc.js

@@ -160,3 +160,9 @@ var _ = require("underscore");

// Add needed Elements for sorting
if( ! block.local.group) block.local.group = path.basename( parsedFilenames[fileIndex] );
if( ! block.local.group) {
block.local.group = path.basename( parsedFilenames[fileIndex] );
// Replace special chars
// TODO: check & escape all other fields -> in template?
block.local.group = block.local.group.replace(/[.]/g, "_");
}
if( ! block.local.type) block.local.type = "";

@@ -163,0 +169,0 @@ if( ! block.local.url) block.local.url = "";

2

lib/parsers/api.js

@@ -15,3 +15,3 @@ function parse(content)

url: matches[2],
title: matches[3]
title: matches[3] || ""
};

@@ -18,0 +18,0 @@ } // parse

{
"name": "apidoc",
"version": "0.6.1",
"version": "0.6.2",
"description": "RESTful web API Documentation Generator",

@@ -5,0 +5,0 @@ "author": "Peter Rottmann <rottmann@inveris.de>",

@@ -92,3 +92,3 @@ require.config({

var title = entries[0].title;
if(title)
if(title !== undefined)
{

@@ -95,0 +95,0 @@ title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; });

@@ -78,2 +78,50 @@ define({ api: [

"type": "get",
"url": "/test/escape",
"title": "Escape Example",
"name": "GetEscape",
"group": "Escape",
"version": "0.6.0",
"description": "<p>Escape Example data.</p>",
"examples": [
{
"title": "Example usage:",
"content": " curl -i http://localhost/escape/text\n <b>curl -i http://localhost/escape/html</b>\n <xml>curl -i http://localhost/escape/xml</xml>\n"
}
],
"success": {
"examples": [
{
"title": "Example Response",
"content": "HTTP/1.1 200 OK {\n field_text: 'text-value',\n field_html: '<b>html-value</b>',\n field_xml: '<xml>xml-value</xml>'\n}\n"
}
]
},
"filename": "test/fixtures/example/escape.js"
},
{
"type": "get",
"url": "/test/escape",
"title": "Escape Example",
"name": "GetEscape",
"group": "Escape",
"version": "0.5.0",
"description": "<p>Escape Example data - with comparison.</p>",
"examples": [
{
"title": "Example usage:",
"content": " curl -i http://localhost/escape/text-old\n <b>curl -i http://localhost/escape/html-old</b>\n <xml>curl -i http://localhost/escape/xml-old</xml>\n"
}
],
"success": {
"examples": [
{
"title": "Example Response",
"content": "HTTP/1.1 200 OK {\n field_text: 'text-value old',\n field_html: '<b>html-value old</b>',\n field_xml: '<xml>xml-value old</xml>'\n}\n"
}
]
},
"filename": "test/fixtures/example/escape.js"
},
{
"type": "get",
"url": "/group/:id",

@@ -1004,3 +1052,3 @@ "title": "Group and Description",

},
"group": "error_structure.js",
"group": "error_structure_js",
"type": "",

@@ -1024,3 +1072,3 @@ "url": "",

},
"group": "error_structure.js",
"group": "error_structure_js",
"type": "",

@@ -1044,3 +1092,3 @@ "url": "",

},
"group": "header_structure.js",
"group": "header_structure_js",
"type": "",

@@ -1064,3 +1112,3 @@ "url": "",

},
"group": "header_structure.js",
"group": "header_structure_js",
"type": "",

@@ -1084,3 +1132,3 @@ "url": "",

},
"group": "structure.js",
"group": "structure_js",
"type": "",

@@ -1104,3 +1152,3 @@ "url": "",

},
"group": "structure.js",
"group": "structure_js",
"type": "",

@@ -1124,3 +1172,3 @@ "url": "",

},
"group": "success_structure.js",
"group": "success_structure_js",
"type": "",

@@ -1144,3 +1192,3 @@ "url": "",

},
"group": "success_structure.js",
"group": "success_structure_js",
"type": "",

@@ -1164,3 +1212,3 @@ "url": "",

},
"group": "title_and_structure.js",
"group": "title_and_structure_js",
"type": "",

@@ -1167,0 +1215,0 @@ "url": "",

@@ -78,2 +78,50 @@ [

"type": "get",
"url": "/test/escape",
"title": "Escape Example",
"name": "GetEscape",
"group": "Escape",
"version": "0.6.0",
"description": "<p>Escape Example data.</p>",
"examples": [
{
"title": "Example usage:",
"content": " curl -i http://localhost/escape/text\n <b>curl -i http://localhost/escape/html</b>\n <xml>curl -i http://localhost/escape/xml</xml>\n"
}
],
"success": {
"examples": [
{
"title": "Example Response",
"content": "HTTP/1.1 200 OK {\n field_text: 'text-value',\n field_html: '<b>html-value</b>',\n field_xml: '<xml>xml-value</xml>'\n}\n"
}
]
},
"filename": "test/fixtures/example/escape.js"
},
{
"type": "get",
"url": "/test/escape",
"title": "Escape Example",
"name": "GetEscape",
"group": "Escape",
"version": "0.5.0",
"description": "<p>Escape Example data - with comparison.</p>",
"examples": [
{
"title": "Example usage:",
"content": " curl -i http://localhost/escape/text-old\n <b>curl -i http://localhost/escape/html-old</b>\n <xml>curl -i http://localhost/escape/xml-old</xml>\n"
}
],
"success": {
"examples": [
{
"title": "Example Response",
"content": "HTTP/1.1 200 OK {\n field_text: 'text-value old',\n field_html: '<b>html-value old</b>',\n field_xml: '<xml>xml-value old</xml>'\n}\n"
}
]
},
"filename": "test/fixtures/example/escape.js"
},
{
"type": "get",
"url": "/group/:id",

@@ -1004,3 +1052,3 @@ "title": "Group and Description",

},
"group": "error_structure.js",
"group": "error_structure_js",
"type": "",

@@ -1024,3 +1072,3 @@ "url": "",

},
"group": "error_structure.js",
"group": "error_structure_js",
"type": "",

@@ -1044,3 +1092,3 @@ "url": "",

},
"group": "header_structure.js",
"group": "header_structure_js",
"type": "",

@@ -1064,3 +1112,3 @@ "url": "",

},
"group": "header_structure.js",
"group": "header_structure_js",
"type": "",

@@ -1084,3 +1132,3 @@ "url": "",

},
"group": "structure.js",
"group": "structure_js",
"type": "",

@@ -1104,3 +1152,3 @@ "url": "",

},
"group": "structure.js",
"group": "structure_js",
"type": "",

@@ -1124,3 +1172,3 @@ "url": "",

},
"group": "success_structure.js",
"group": "success_structure_js",
"type": "",

@@ -1144,3 +1192,3 @@ "url": "",

},
"group": "success_structure.js",
"group": "success_structure_js",
"type": "",

@@ -1164,3 +1212,3 @@ "url": "",

},
"group": "title_and_structure.js",
"group": "title_and_structure_js",
"type": "",

@@ -1167,0 +1215,0 @@ "url": "",

@@ -14,5 +14,5 @@ define({

"generator": {
"version": "0.6.0",
"time": "2014-07-10T14:42:38.537Z"
"version": "0.6.2",
"time": "2014-08-08T13:56:55.412Z"
}
});

@@ -14,5 +14,5 @@ {

"generator": {
"version": "0.6.0",
"time": "2014-07-10T14:42:38.537Z"
"version": "0.6.2",
"time": "2014-08-08T13:56:55.412Z"
}
}

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