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

[EPIC] How to migrate LB3 clients #3954

Closed
6 tasks
bajtos opened this issue Oct 17, 2019 · 6 comments
Closed
6 tasks

[EPIC] How to migrate LB3 clients #3954

bajtos opened this issue Oct 17, 2019 · 6 comments

Comments

@bajtos
Copy link
Member

bajtos commented Oct 17, 2019

This is a follow-up for #3718 and #3922.

Write content for docs/site/migration/clients.md and explain how to migrate LB3 clients using loopback-specific SDKs to LB4.

List of known LB3 SDKs:

@joschne
Copy link
Contributor

joschne commented Oct 31, 2019

I would like to bring an idea into the field: OpenApiTools/openapi-generator might help with this.

Because I need a substitute for loopback-sdk-builder I gave it a try.

In this approach the OpenApiSpecs (explorer/openapi.json) generated by LoopBack 4 figures as a middleman between LoopBack and the generator of SDKs. In consequence we could relay on code maintained by a wider community, supporting more than 50 languages/frameworks, independent from LoopBack but compatible with LoopBack thanks to the OpenAPI Spec standard.

I have no experience with this approach but I think it's worth a consideration...

Edit
Another example using this approach based on @loopback/example-todo-list.

@dhmlau dhmlau removed the epic label Jan 15, 2020
@bajtos
Copy link
Member Author

bajtos commented Feb 6, 2020

@joschne thank you for joining the discussion! It has been our intention for a long time to abandon LoopBack-specific client SDKs and rely on Swagger/OpenAPI client code generation instead. As you said:

we could relay on code maintained by a wider community, supporting more than 50 languages/frameworks, independent from LoopBack but compatible with LoopBack thanks to the OpenAPI Spec standard.

Do you happen to know what's the relation between swagger-codegen and openapi-generator and how they differ from each other?

BTW if you are using Angular, you may want to also try https://github.com/cyclosproject/ng-openapi-gen

Because I need a substitute for loopback-sdk-builder I gave it a try.

This is awesome! Would you like to contribute the instructions described in https://github.com/joschne/loopback-4-ngx-build-sdk to the official LoopBack documentation?

I think there are two pieces of content that will be useful to LoopBack users:

  1. How to talk to a LB4 application from Angular - describe how to generate the client using a codegen tool.
  2. How to migrate an Angular client from loopback-sdk-builder to the solution described in the step 1 above.

@joschne
Copy link
Contributor

joschne commented Feb 6, 2020

@bajtos I'm happy to hear you like the suggested approach.

I had to pause the migration from lb3 to lb4. Thus, our software is still running on lb3. Chances are high, that in the run of this year we can continue our work on the migration to lb4. If / when we do so, I'm willing to actively contribute to the official LoopBack documentation. Before that my hands are tied.

Do you happen to know what's the relation between swagger-codegen and openapi-generator and how they differ from each other?

I have no insider information. My decision for openapi-generator is not based on solid ground, but, back in October, it was influenced by:

BTW if you are using Angular, you may want to also try https://github.com/cyclosproject/ng-openapi-gen

Thank you!

This is awesome! Would you like to contribute the instructions described in https://github.com/joschne/loopback-4-ngx-build-sdk to the official LoopBack documentation?

Please feel free to take everything from my two examples and integrate it in the official LoopBack documentation. May be the second repo could be useful in combination with the existing to-do-app examples.

I think there are two pieces of content that will be useful to LoopBack users:

  1. How to talk to a LB4 application from Angular - describe how to generate the client using a codegen tool.
  2. How to migrate an Angular client from loopback-sdk-builder to the solution described in the step 1 above.

I agree: These are the two pieces needed in the official LoopBack documentation.

@agnes512
Copy link
Contributor

Will we cover strong-pubsub*? #6190

@stale
Copy link

stale bot commented Jul 14, 2021

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

@stale stale bot added the stale label Jul 14, 2021
@stale
Copy link

stale bot commented Aug 13, 2021

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants