-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass all method parameters in constructor #56
Conversation
So we're dropping support for the old declaration style? I don't think that's a good idea. Maybe we can support both? I know it's version 0.x, but that seems too radical. |
this._options = {}; | ||
__constructor: function (method) { | ||
if (!method || !method.name || !method.action) { | ||
throw new ApiError(ApiError.INTERNAL_ERROR, 'Method name and method action are unspecified'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the error should be something like 'Some of the required method properties were not specified (name, action).'
Firstly, I kept the old version but then pruned it. Services should rewrite their code anyway. Renaming changes was radical, too. Ok, I'll revert removing old methods, mark them as |
ac0db65
to
5b09986
Compare
pr with updated normalize function waits for merging this pr. Please take a look, guys. |
.setAction(function (params, request, api) { | ||
methods: { | ||
type: 'Array', | ||
description: 'Set of methods with a data', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... with data ... or with params
LGTM Upd: though, I'm not a guy ;) |
|
I did what @dodev suggested. So, let's say that 1 LGTM is sufficient for this pr ;) |
Pass all method parameters in constructor
Implementation of the interface: