-
Notifications
You must be signed in to change notification settings - Fork 25
/
endpoint.js
38 lines (30 loc) · 1004 Bytes
/
endpoint.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var colors = require("colors");
var utils = require("../utils");
exports.swagger = false;
exports.login = false;
exports.category = "basic";
exports.desc = "Learn how to document an endpoint";
exports.weight = 3;
exports.run = function(config, info) {
console.log(
"You can document each endpoint right above the code. Just use the"
);
console.log("following syntax in a comment above the code:");
console.log("");
console.log(utils.swaggerInlineExample(utils.guessLanguage()));
console.log("");
console.log(
"Param shorthand: ".blue +
"Since params are very verbose, we have a shorthand"
);
console.log("for describing them.");
console.log("");
console.log(" - (in) name=default* {type:format} description".grey);
console.log("");
console.log("This will be expanded when the Swagger file is compiled.");
console.log("");
console.log(
"For more information on this syntax, see https://github.com/readmeio/swagger-inline"
);
process.exit();
};