route-helper: include `notes` and `deprecated`

This commit is contained in:
Miroslav Bajtoš 2014-10-13 16:32:12 +02:00
parent 37179f3e61
commit 4d0e711087
2 changed files with 16 additions and 2 deletions

View File

@ -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
})] })]
}; };

View File

@ -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