Skip to content

Deprecated warnings when generating Loopback Angular service #2593

Closed

Description

@jmereaux

Hi folks,

A few days ago, I started noticing some deprecated warnings when using the lb-ng command to generate the Angular client service.

strong-remoting deprecated getFullPath() is deprecated, use getEndpoints()[0].fullPath instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:37:287
strong-remoting deprecated getHttpMethod() is deprecated, use getEndpoints()[0].verb instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:94:12
strong-remoting deprecated getFullPath() is deprecated, use getEndpoints()[0].fullPath instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:42:130
strong-remoting deprecated getHttpMethod() is deprecated, use getEndpoints()[0].verb instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:42:214
strong-remoting deprecated getHttpMethod() is deprecated, use getEndpoints()[0].verb instead. eval at <anonymous> (/Users/johan/.nvm/v4.2.4/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/node_modules/loopback-sdk-angular/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:94:48

The client service seems to be properly generated, but just wanted to check if these warnings are problematic or not.

Thanks a lot for your help

Activity

  1. self-assigned this
    on Aug 8, 2016
  2. Amir-61 commented on Aug 8, 2016

    @Amir-61
    Member

    Hello @jmereaux,

    just wanted to check if these warnings are problematic or not.

    We deprecated getFullPath() and getHttpMethod() since they were designed for single path and method; now we have implemented getEndpoints, by which you can get methods as well as paths, also it works for multiple paths and methods.

    So the equivalent of your previously used getFullPath() and getHttpMethod () would be getEndpoints()[0].fullPath and getEndpoints()[0].verb respectively.

    Hope this answers your question. If so I will close this ticket soon.

    Thanks!

  3. jmereaux commented on Aug 9, 2016

    @jmereaux
    Author

    Hello @Amir-61

    Thanks a lot for taking the time to answer.
    The thing is I don't think I use these deprecated methods explicitly myself. These warning are shown when generating the Angular client service for the API I developed (when issuing the command lb-ng server/server.js <path_to_the_generated_service>)

    Would you know what I should do in order to suppress these warnings? Or can I safely ignore them?

    Thanks

  4. Amir-61 commented on Aug 9, 2016

    @Amir-61
    Member

    Hi @jmereaux,

    What version of loopback-sdk-angular are you using? It seems it is solved in version1.9.0.
    I believe @davidcheung took care of warnings by PR#229

  5. jmereaux commented on Aug 9, 2016

    @jmereaux
    Author

    Hi @Amir-61

    I was using 1.7.0.
    Upgraded strongloop to 6.0.1 (which includes loopback-angular-sdk@1.9.0) and the warnings disappeared.

    Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions