Add a literal escape tag
Resonance1584 opened this issue · 3 comments
Instead of allowing special characters in some fields and not others add a literal escape so users can output : or [ in fields. See http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#%7B@literal%7D
Use case:
I want to set the fieldname of my GET parameter to aaab[ccdd] but the parser only recognises alphanumeric, slash etc. Allow me to manually escape the [ and ] characters.
I have a similar problem. I need to add documentation for OData query string parameters which use $ as prefix. May be markdown backslash escapes could also be a solution: http://daringfireball.net/projects/markdown/syntax#backslash
eg:
GET path/to/my/api/list?$filter=...&$skip=10&$top=10&$orderby=...
/**
* @api {get} path/to/my/api/list List
* ...
* @apiParam (Query String) {String} [\$filter] Selects only the Entries that satisfy the predicate expression
* @apiParam (Query String) {Number} [\$top] Gets only the first N items of the set
* ...
*/
I've fixed a similar problem in #19
If you need to replace the file to support that, on debian, change
/usr/lib/node_modules/apidoc/node_modules/apidoc-core/lib/parsers/api_param.js
with
https://raw.githubusercontent.com/alessandro-aglietti/apidoc-core/master/lib/parsers/api_param.js
I have the same problem but inside @apiexample:
* @apiExample {ruby} Ruby
* require "greensms"
* @client = GreenSMS::GreenSMSClient.new(user: "test", pass: "test")
* response = @client.call.send(to: '70000000000')
* puts response["code"]
-- breaks on @client.