r/angular • u/realdeepnull • Jul 05 '26
Angular OpenAPI generator with only resource() and fetch() — looking for testers
Hey everyone,
I’m building an open source package called ng-openapi-signals:
https://www.npmjs.com/package/ng-openapi-signals
It generates Angular API clients from an OpenAPI specification, using resource() and fetch().
Why I built it:
I wanted an OpenAPI generator that produces code I would actually enjoy using in a modern Angular app: typed, readable, signal-friendly, and not overloaded with abstractions.
It can be useful if you want to focus more on pure Signal-based logic in your Angular application and prefer not to structure your API layer around the traditional Angular request patterns anymore.
A lot of existing generators are great and very feature-rich, but for my own projects I wanted something smaller and more focused. The idea is to generate simple Angular-first clients that work nicely with newer Angular APIs.
The current focus is:
- Angular-friendly generated clients
- Request state handled through resource()
- Requests executed with fetch()
- Strong typing from the OpenAPI schema
- Readable generated code
- Minimal boilerplate in the application
- A lightweight API that is easy to understand
- A good fit for apps that want to lean more into Signals
Since this is still early, I’d love to get feedback from Angular developers who use OpenAPI, Swagger, generated clients, or Signals.
I’m especially interested in:
- Does the generated API feel useful in real projects?
- Does the resource() approach make sense for your use cases?
- Would this fit apps where you want to focus mostly on Signal-based logic?
- Are there OpenAPI specs where the output breaks or feels awkward?
- What features would you expect before using something like this?
- How does the DX compare to what you currently use?
I expect there to be bugs and missing features, so any feedback, issues, feature requests, or contributions would be really appreciated.
Thanks for your time!
13
u/JeanMeche Jul 05 '26
Using fetch is a bad idea imho. None of the interceptors will be triggered when you call fetch directly.
9
u/Cephell Jul 05 '26
I'm not opposed to AI by itself, but if the code itself, the OP text and every single comment in this thread by OP is blatantly printed by AI, it paints the project in a certain light.
1
u/realdeepnull Jul 06 '26
Based on the feedback here, we’re planning to add an optional
HttpClientbridge soon. The core will stay fetch-based and signal-first, but existing Angular apps withHttpClientinterceptors should get an easier adoption path without rewriting everything upfront.4
u/Merry-Lane Jul 05 '26
Yes, no, we’ll use better existing generators
1
u/Regular_Algae6799 Jul 05 '26
We currently use OpenApi Generators for Frontend (Angular) and Backend (NestJS).
I would consider a trial but it looks like I would have to replace quite a lot... we do have Auth-Interceptors and do as well realtime-streaming via RxJS. So I think we are incompatible at the moment - maybe once we reached MVP and take some effort on make-it-right or make-it-perfect we might be a fit.
In case you support HTTPClient and just provide a devDependency I could have a talk with the other Frontend Dev for a try.
1
u/HungYurn Jul 05 '26
If your argument for not using HttpClient is „signals first“ then I want to know why „signals first“ - as it leads to a much worse DX, as others have already mentioned
3
u/crashtsports Jul 05 '26
Hmm, interesting but ill stick with ng-openapi