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

[Docs] Top-down (swagger gen) app tutorial #734

Closed
b-admike opened this issue Nov 15, 2017 · 7 comments
Closed

[Docs] Top-down (swagger gen) app tutorial #734

b-admike opened this issue Nov 15, 2017 · 7 comments

Comments

@b-admike
Copy link
Contributor

Story

As a LoopBack4 user, I would like an easy to follow and intuitive tutorial which shows me how to make a LB4 app using a top-down approach, where I start with a swagger definition.

Acceptance Criteria

TBD

@bajtos
Copy link
Member

bajtos commented Dec 15, 2017

Top-down approach is out of scope of MVP.

@bajtos bajtos added the Core-GA label Dec 15, 2017
@bajtos bajtos mentioned this issue Feb 6, 2018
4 tasks
@dhmlau dhmlau removed the non-DP3 label Mar 27, 2018
@dhmlau
Copy link
Member

dhmlau commented Apr 10, 2018

related to #725

@dhmlau
Copy link
Member

dhmlau commented Oct 27, 2018

@strongloop/sq-lb-apex @bajtos @raymondfeng @hacksparrow, now that we have lb4 openapi command and the docs page https://loopback.io/doc/en/lb4/OpenAPI-generator.html. I'm thinking we can close this task as done. What do you think?

The blog post from @raymondfeng (https://strongloop.com/strongblog/loopback4-openapi-cli/) covers this topic more in depth and contains more examples. If you think the current docs is not sufficient, we can move some of the content in that blog to our documentation as well.

@jannyHou
Copy link
Contributor

I am good to close this issue, or add a section for "api definition first approach" under the "Best Practice"
https://loopback.io/doc/en/lb4/Best-practices.html.
Mention that with a lb4 app, users can generate artifacts from an existing OpenAPI spec file, then point to the generator page and blog.

@bajtos
Copy link
Member

bajtos commented Jun 7, 2019

Please note that top-down approach is not about taking an OpenAPI spec file and generating TS code with @get and @param decorators. In the top-down approach, the OpenAPI spec is the source of truth about the operations and their parameters. The TypeScript code is providing only implementation of the individual endpoints, using OAI extensions like x-controller-name and x-method-name to link endpoints with controller methods.

The problem of the lb4 openapi approach is that when the OpenAPI spec file changes, there is no easy way how to apply those changes to the generated code.

@stale
Copy link

stale bot commented Jun 2, 2020

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 Jun 2, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

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 Jul 3, 2020
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

5 participants