route-helper: include `notes` and `deprecated`
This commit is contained in:
parent
37179f3e61
commit
4d0e711087
|
@ -137,8 +137,9 @@ var routeHelper = module.exports = {
|
||||||
parameters: accepts,
|
parameters: accepts,
|
||||||
// TODO(schoon) - We don't have descriptions for this yet.
|
// TODO(schoon) - We don't have descriptions for this yet.
|
||||||
responseMessages: [],
|
responseMessages: [],
|
||||||
summary: route.description, // TODO(schoon) - Excerpt?
|
summary: route.description,
|
||||||
notes: '' // TODO(schoon) - `description` metadata?
|
notes: route.notes,
|
||||||
|
deprecated: route.deprecated
|
||||||
})]
|
})]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,19 @@ describe('route-helper', function() {
|
||||||
expect(opDoc.format).to.equal('byte');
|
expect(opDoc.format).to.equal('byte');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('includes `notes` metadata', function() {
|
||||||
|
var doc = createAPIDoc({
|
||||||
|
notes: 'some notes'
|
||||||
|
});
|
||||||
|
expect(doc.operations[0].notes).to.equal('some notes');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('includes `deprecated` metadata', function() {
|
||||||
|
var doc = createAPIDoc({
|
||||||
|
deprecated: 'true'
|
||||||
|
});
|
||||||
|
expect(doc.operations[0].deprecated).to.equal('true');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Easy wrapper around createRoute
|
// Easy wrapper around createRoute
|
||||||
|
|
Loading…
Reference in New Issue