diff --git a/lib/route-helper.js b/lib/route-helper.js index 263bbd2..b47b850 100644 --- a/lib/route-helper.js +++ b/lib/route-helper.js @@ -137,8 +137,9 @@ var routeHelper = module.exports = { parameters: accepts, // TODO(schoon) - We don't have descriptions for this yet. responseMessages: [], - summary: route.description, // TODO(schoon) - Excerpt? - notes: '' // TODO(schoon) - `description` metadata? + summary: route.description, + notes: route.notes, + deprecated: route.deprecated })] }; diff --git a/test/route-helper.test.js b/test/route-helper.test.js index 396007c..a25d993 100644 --- a/test/route-helper.test.js +++ b/test/route-helper.test.js @@ -75,6 +75,19 @@ describe('route-helper', function() { 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