There is already support for angular but we have been using typescript nestjs for our backend and frontend work. I would like to add support for nestjs.
I would like this to be okay and I will work on the PR.
sure, any contribution is welcome. Please keep in mind https://github.com/OpenAPITools/openapi-generator/issues/802
cc @TiFu
@macjohnny can do!
If you want to help the typescript refactoring, this would be very nice
Unfortunately, I currently don't have the capacity to actively work on the refactoring due to some other stuff going on in my life. However, the most basic features are supported in the new code base and kinda documented. If @vfrank66 decides to implement nestjs support in the refactored code base, I'd be happy to provide some guidance on that.
Otherwise, I think it would also be possible to just implement nestjs support by cloning one of the other generators and working from there. Integrating this new generator later in the refactored code base is not a big issue imo as most of the code generators require only either a) adapting the http request library and/or b) generating some boilerplate code.
Alright I'll help out, I see #802 and a lot of different issues. I will help get this converted in order to then add nestjs. Any contribution? Or what would you like completed first or what filter to use on the issues? @TiFu @macjohnny
Alright I'll help out
that's excellent, thank you!
@vfrank66 Thanks a lot!
The code for the rework is currently on the typescript-refactor branch and follows the structure outlined in #802. So far I have added support for ts-fetch and I think jquery is almost done.
I think you could either try to add other generators (angular, rxjs, axios, node request module) support or just try to include nestjs in this new structure. My understanding so far is that nestjs significantly differs from the two generators I already implemented (the main difference between fetch & jquery being that the HTTP library is different - everything else is basically the same).
I think simply adding nestjs based on what's already there might be a good idea, so that we see if our structure is general enough to work with a variety of different frameworks. To better understand the structure, I would probably advise you to have a look at the ts-fetch generator first and try to adapt its approach. If there is specific code needed for nestjs, wrapping the API clients in another class (which would be located in the framework specific code layer in the svg in #802) would be the right approach. If I can help you in any way, let me know and we can either discuss it on github or maybe even have a short skype call if that's easier.
I believe you don't have commit access to OpenAPITools, so if your changes are ready, you can just PR against typescript-refactor, tag me and then I'll have a look.
@TiFu okay I started looking at the code and the changes between master and typescript-refactor. Is this project still current https://github.com/OpenAPITools/openapi-generator/projects/4? It seems TODO's match up with what you responded with.
We can take this conversation outside of here if you would like, just let me know.
Yeah it is up-to-date. I will have a look at the TODO items tomorrow and see if I can make their titles a little bit clearer and add some more context.
We can take this conversation outside of here if you would like, just let me know.
I don't have any preference, whatever helps you most.
This is a nice idea! @vfrank66 out of curiosity, what are your plans for the NestJS generated clients? I mean: how will they differ from the regular typescript-node clients? Do you want to generate full services ready to be injected using Nest's DI?
@vfrank66 would you want to implement this in the current master, too? so it could be made available soon.
Sorry started this and then fell asleep on it, will complete this week.
@quezak - nestjs will be most similar to typescript-angular with small exceptions like token injection, and decorator naming convention. With regards to these library similarities it will be injectable into the nestjs DI container as a nestjs service, or in nestjs terms module just as angular codegen is injectable into angular DI. I have the code written and issue open with the swagger-openapi for reference if you would like to see it complete.
@macjohnny i am currently off typescript-refactor or you asking me to switch that to master and PR against master?
If you want to have your feature published in an official release soon I suggest you to file your PR against master. I don鈥榯 know how long it will take for the typescript refactoring to land
@macjohnny thank you sorry work got in the way, so I have the code which I know works with the other swagger codegen setup. I seem to be having a problem getting the class loader to recognize the new generator. I followed the directions online just in case and no luck. So I am stuck but pushed what I have to my fork. I was hoping someone could explain to me what else besides adding a line to org.openapitools.codegen.CodegenConfig I need to do.
@wing328 can you help here?
Hello, I would also be interested in this feature. What is the current status?
@vfrank66 please file a PR to start with. We'll review and let you know what else needs to be done to get it merged into master.
@wing328 okay I can do that
@wing328 PR, sorry for the delay
@vfrank66 no need to apologize and we all appreciate your contributions to this project 馃憤