From 4c246c7f2c84f835fe8f0a631ffde468c4da430f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 3 Apr 2014 10:39:42 +0200 Subject: [PATCH] Describe the "id" parameter of model's sharedCtor Extend remoting metadata to describe the "id" parameter accepted by the sharedCtor of all models. --- lib/models/model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/models/model.js b/lib/models/model.js index 7d52c3b4..bb59b129 100644 --- a/lib/models/model.js +++ b/lib/models/model.js @@ -100,8 +100,9 @@ Model.setup = function () { }; // Map the prototype method to /:id with data in the body + var idDesc = ModelCtor.modelName + ' id'; ModelCtor.sharedCtor.accepts = [ - {arg: 'id', type: 'any', http: {source: 'path'}} + {arg: 'id', type: 'any', http: {source: 'path'}, description: idDesc} // {arg: 'instance', type: 'object', http: {source: 'body'}} ];