npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@avsystem/openapi-ng

v0.2.0

Published

CLI-first Node package for generating TypeScript and Angular artifacts from a supported OpenAPI 3.x subset.

Downloads

369

Readme

openapi-ng

Generate TypeScript models and Angular services from OpenAPI 3.x specs — fast, deterministic, Rust-powered.

Documentation → · Getting started · Angular guide · Node API · Diagnostics

Why openapi-ng

  • Rust-powered codegen. The engine is a native binary loaded via NAPI-RS. The same input always produces identical output.
  • Angular-first output. Each operation ships with three flavors — .observable(), .resource(), .request() — matching Angular's current HTTP primitives.
  • Strict OpenAPI subset. A focused 3.x slice with clear diagnostics. No silent misgeneration; see Assumptions & limitations for the accepted shape.
  • Configurable naming. Tune method names and service grouping with template + regex rules, via YAML, JSON, or TypeScript config.
  • Thin, pass-through helpers. Generated methods just build the request (method, URL, query, body) and forward every HttpClient.request / httpResource option through unchanged — withCredentials, transferCache, reportProgress, equal, injector, and the rest. The response reaches you untouched.

Install

bun add -d @avsystem/openapi-ng

Requires Node.js >= 18. Pre-built binaries for macOS, Linux, and Windows (x64 / ARM64). See Runtime & platforms.

Quickstart

openapi-ng generate --input petstore.openapi.yaml --output ./generated
✓ Generated 5 files from Petstore (3.0.3)
  1 path · 1 operation · 1 schema

  model.generated.ts
  rest.model.ts
  rest.util.ts
  rest.validate.ts
  rest/pet.rest.generated.ts

Wire a generated service into a component:

import { Component, inject } from '@angular/core';
import { PetRest } from './generated/rest/pet.rest.generated';

@Component({
  /* ... */
})
export class PetList {
  readonly #pets = inject(PetRest);

  // Signal-based, reactive, with a default value while loading.
  readonly list = this.#pets.listPets.resource({ defaultValue: [] });
}

Signal-forms async validation: rest.validate.ts

A validateRest(path, restMethod, opts) helper wraps Angular signal-forms validateAsync and delegates to the generated RequestFn.resource(), preserving request/response typing:

import { validateRest } from './generated/rest.validate';

validateRest(emailPath, accountRest.checkEmail, {
  request: (ctx) => ({ email: ctx.value() }),
  onError: () => ({ kind: 'email-taken' }),
});

@angular/forms is an optional peer — install it only if you import from rest.validate.ts; the file tree-shakes away when unused.

Full walkthrough on docs.openapi-ng.dev/getting-started.

Development

pnpm install
pnpm build         # release build (Rust + NAPI)
pnpm build:debug   # debug build (faster compile)
pnpm test          # Node integration tests (AVA)
cargo test         # Rust unit tests
pnpm lint          # oxlint
pnpm format        # oxfmt + rustfmt + taplo

Rust changes require a rebuild (pnpm build or pnpm build:debug) before tests reflect them.

Bug reports and PRs welcome at github.com/AVSystem/openapi-ng.

License

MIT © 2026