Add structure for adding examples to HTTP APIs.
Use 'x-example' to add examples to parameters which are not in 'body' (swagger doesn't define that currently). Add profile API examples. Add necessary glue and templates to make it all work.
This commit is contained in:
parent
c75fd6bcae
commit
862f5a3a53
4 changed files with 66 additions and 9 deletions
|
@ -27,8 +27,10 @@ if (!opts.schema) {
|
|||
parser.parse(opts.schema, function(err, api, metadata) {
|
||||
if (!err) {
|
||||
console.log("%s is valid.", opts.schema);
|
||||
process.exit(0);
|
||||
return;
|
||||
}
|
||||
console.log(metadata);
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue