cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
404 stars 134 forks source link

Generating of a client as Angular library #207

Closed ISTAnsver closed 2 years ago

ISTAnsver commented 2 years ago

Hello!

It is going to be cool if ng-openapi-gen will have ability to generate an API client as Angular library that exporting an api module, services and models through public-api.ts. For providers(backend developres) this feature gives ability to supply the API client to customers(frontend developers) out of the box. Providers can use ng-openapi-gen tool in CI/CD process and generate the API client within a pipeline that used for the API. When API updates then the API client updates too. For consumers this feature makes an integration easier. They must just install/update a package and don't worry anything else.All problems with integration in such case can be solved through npm i. It can increase software development speed in teams.

It sounds good enough)

luisfpg commented 2 years ago

As far as I understand, all pieces are there. To generate a library, all you need is a library project, with the correct pieces in place. ng-openapi-gen generates a module already. However, generating a whole project is out of scope.

ISTAnsver commented 2 years ago

Got it! Thank you for the answer!

ashblue commented 2 years ago

I would also love to have a public api file auto generated. Our team is using this library to generate code in a monorepo right now as an Angular library.