raml-javascript-generator icon indicating copy to clipboard operation
raml-javascript-generator copied to clipboard

support simple single primative uri parameters

Open jardilio opened this issue 8 years ago • 2 comments

Given a resource of users/{userId}, the method users.userId({userId: 123}) is overly verbose and redunant. If the given URI has a single param and the input value passed is a single primative value, then resolve this automatically so that you can simply call users.userId(123).

The later was the way it worked in previous versions of the generated template.

jardilio avatar Sep 21 '16 19:09 jardilio

Ping...anyone? I even included tests for this and I'd rather link to the official repo than have to link to my fork. This appears to be a regression from the previous version of the generator, but my PR makes it work both ways gracefully.

jardilio avatar Oct 21 '16 21:10 jardilio

yes please!

robertlevy avatar Feb 22 '17 15:02 robertlevy