Skip to content
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

Handle arg options http: 'optionsFromRequest' #317

Closed
2 of 6 tasks
rodplata opened this issue Jan 15, 2017 · 1 comment
Closed
2 of 6 tasks

Handle arg options http: 'optionsFromRequest' #317

rodplata opened this issue Jan 15, 2017 · 1 comment

Comments

@rodplata
Copy link

rodplata commented Jan 15, 2017

What type of issue are you creating?

  • Bug
  • Enhancement
  • Question

What version of this module are you using?

  • 2.0.10 (Stable)
  • 2.1.0-rc.n (2.1 Release Candidate n)
  • Other

Write other if any:

Please add a description for your issue:

Now Loopback 3.0 (and Loopback 2.x) inject the access token in the options value of the Remote Method (to Observe hooks), to enable that in the remote method you need to put
{arg: 'options', type: 'object', http: 'optionsFromRequest'}

The SDK generator takes this as other parameter of the remote method, and put it on the function in angular, and this is not needed in angular function, and must no be there

It is needed to add a if arg htts is 'optionsFromRequest' DO NOT INCLUDE IT

@rodplata
Copy link
Author

Closing this, duplicated in #310

josephsnow added a commit to BizVision/loopback-sdk-builder that referenced this issue Jan 31, 2017
josephsnow referenced this issue in BizVision/loopback-sdk-builder Jan 31, 2017
Don't show internal server only remote method arguments in the client sdk declaration
ref mean-expert-official#310
josephsnow added a commit to BizVision/loopback-sdk-builder that referenced this issue Jan 31, 2017
… place.

I just moved it to be inside buildMethodParams instead of buildUrlParams

updated paramIsRequestOptions, it was not correctly catching all cases.
 the param.http is replaced with a runtime function and may not be the 'optionsFromRequest' string at runtime.

Also updated service.ejs doc generation to correctly filter out internal functions
  doc generation matches buildMethodParams param filter now

refs mean-expert-official#317
@lygstate lygstate mentioned this issue Mar 13, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant