Migrate LB3 datasources to LB4 format #7157
Replies: 3 comments
-
Hi @condratbogdan when you say "How can i get the same effect using LB4 components", do you mean turn the app with accounts services into a LB4 component? Or you want to invoke the account service in a LB4 component? |
Beta Was this translation helpful? Give feedback.
-
I want to invoke the account service in a LB4 component. |
Beta Was this translation helpful? Give feedback.
-
In LoopBack 4, we use the concept of a Service (or a Service Proxy) to connect the application to 3rd party web services. Please take a look at our documentation page Calling REST APIs, it shows how to define a datasource and invoke remote service methods. I think our OpenAPI connector supports Swagger too (Swagger is v2.0, OpenAPI is v3.0). |
Beta Was this translation helpful? Give feedback.
-
We have entries like this in our Core service datasources.json file, that represent endpoints in another service named Accounts:
We could then use the endpoints from the service inside our loopback app like this, Accounts.Accounts_findById({...}).
How can i get the same effect using LB4 components? (both creation of datasource and method invokation)
Beta Was this translation helpful? Give feedback.
All reactions