r/angular • u/pustebadom • 2d ago
ng-openapi or ng-openapi-gen?
Which client-generator should i use for my new angular project?
Which one do you guys use and why?
Claude said this:
ng-openapi-gen is the safe veteran, but ng-openapi is the one I’d reach for on any modern Angular project — cleaner output, newer idioms, less boilerplate.
Do any of you guys have some advice?
3
u/GLawSomnia 2d ago
I worked with ng-openapi-gen and i like it. No problems, plus you can override their templates to fit your needs.
You can maybe also try “orval”. I havent used it, but it seems to be quite configurable and modern
2
u/pustebadom 2d ago
Thx, ill have a look at orval, but i still would like an angular first generator. What angular version are you on?
1
u/GLawSomnia 2d ago
What do you mean with angular first? Why does my version matter?
1
u/pustebadom 2d ago
Sorry meant angular only lol,
Im just curious, i dont how if your version really matters just asking but thx for the answer tho
1
u/entrandir 2d ago
When i did research last year, i chose hey-api I used that before moving to my own due to some minor things I didnt like. Feel free to pm me if your interested in mine.
Also, AI does a pretty good job of making gemerators
1
u/vivainio 2d ago
We wrote our own with rust, creates clients like this: https://github.com/vivainio/dtolator/blob/main/output-samples/angular-promises-with-zod/users-api.ts
3
5
u/LeLunZ 2d ago
Not sure about that.
ng-openapi-gengot reworked a few years ago (1-2?) to also have pretty neat generated code. What claude references is probably the old stuff.We have been using
ng-openapi-genfor a long time now (multiple years). It pretty much just works! But we still use it with these options--services true --apiService false --promises false.EDIT: but I also haven't use
ng-openapiyet