raml-javascript-generator
raml-javascript-generator copied to clipboard
support simple single primative uri parameters
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.
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.
yes please!