[docs] use print() so control flow is clearer

This commit is contained in:
spalger
2016-11-16 12:31:42 -07:00
parent 29eb81a52c
commit dd8fab9bdc

View File

@ -31,18 +31,22 @@ The default method is `<%= action.spec.method || 'GET' %>` and the usual <<api-c
*Params* *Params*
[horizontal]<% [horizontal]<%
_.each(action.allParams, function (param, paramName) { %> _.each(action.allParams, function (param, paramName) {
`<%= paramWithDefault(paramName, param.default) %>`::
`<%= paramType(param.type) %>` -- <%= joinParagraphs(param.description || '', 4) %><% // param name
if (param.type === 'enum') {%> print(`\n\`${paramWithDefault(paramName, param.default)}\`::`)
Options:::<%
_.each(param.options, function (opt) {%> // param type and description
* `"<%= opt %>"`<% print(`\n\`${paramType(param.type, paramName)}\` -- ${joinParagraphs(param.description || '', 4)}`)
});%>
<% if (param.type === 'enum') {
} // endif enum print('\nOptions:::')
_.each(param.options, function (opt) {
}); // endeach param %> print(`\n * \`"${opt}"\``)
})
print('\n')
}
}); %>
link:#[back to top]<% link:#[back to top]<%