Skip to content

Commit

Permalink
Describe the "id" parameter of model's sharedCtor
Browse files Browse the repository at this point in the history
Extend remoting metadata to describe the "id" parameter accepted
by the sharedCtor of all models.
  • Loading branch information
Miroslav Bajtoš committed Apr 3, 2014
1 parent 006aca6 commit 4c246c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/models/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}}
];

Expand Down

0 comments on commit 4c246c7

Please sign in to comment.