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

[CLI] Create whole app from OpenAPI #725

Closed
kjdelisle opened this issue Nov 15, 2017 · 3 comments
Closed

[CLI] Create whole app from OpenAPI #725

kjdelisle opened this issue Nov 15, 2017 · 3 comments

Comments

@kjdelisle
Copy link
Contributor

kjdelisle commented Nov 15, 2017

Story

As a loopback4 user, I would like to use a quick command on the CLI to read in my OpenAPI spec and generate a REST API project that is the working version of that specification.

**REVISIT THIS ISSUE AFTER #739 **

Acceptance Criteria

  • Read OpenAPI spec and
    • For each "server":
      • parse the basePath, protocol type (http/s) and port number
      • create a Server instance?
      • create all listed routes as controllers
      • for each controller:
        • associate the controller with the particular server instance that owns it
        • create each CRUD method for the listed operations underneath
      • for each schema in "components/schemas"
        • generate a (class/type/interface) to represent the schema
    • Add all servers to the application context
@bajtos
Copy link
Member

bajtos commented Dec 8, 2017

Cross-posting #700 (comment) from @M-jerez:

This probably has been discussed before, but I would go the other way around, I would define the models using the Swagger/OpenAPI schema, and generate TS interface/class to extend/implement.
This would allow for much better tooling for models creation/edition without coding requirements (thinking on CRM-CMS) and still

@bajtos
Copy link
Member

bajtos commented Jun 25, 2018

I think this feature will be done one #1399 lands.

@dhmlau
Copy link
Member

dhmlau commented Jul 23, 2018

Closing it as done.

@dhmlau dhmlau closed this as completed Jul 23, 2018
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