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

@inversifyjs/open-api-2-typescript

v0.3.0

Published

InversifyJs OpenAPI to TypeScript transformer package

Readme

Test coverage npm version

@inversifyjs/open-api-2-typescript

Inversify monorepo open-api-2-typescript modules.

This package prints TypeScript type declarations from OpenAPI documents by collecting components.schemas and operation parameter schemas and composing @inversifyjs/json-schema-2-typescript. A schema title is used as the TypeScript name when present; otherwise the component key is used. Operation path, query, querystring, header, and cookie parameter types are named from the PascalCase operationId (or HTTP method plus path) and a location suffix (PathParams, Query, Querystring, Headers, Cookies). A location with no parameters on that operation is omitted. Header parameters named Accept, Content-Type, or Authorization are ignored regardless of case, as required by OpenAPI 3.1 and 3.2. Operations under both paths and webhooks are included. The generated Root type is the union of those schemas.

A single querystring parameter is unwrapped: the generated type is that parameter's schema, not an object keyed by the parameter name. Multiple querystring parameters on the same operation are printed as an object keyed by parameter name.

Parameter and path item $ref values are resolved against the document URI, including fragment-only refs such as #/components/parameters/Page and OpenAPI 3.2 $self. Refs that do not resolve to a resource in this document are omitted.

Currently supported OpenAPI versions:

  • @inversifyjs/open-api-2-typescript/v3Dot1
  • @inversifyjs/open-api-2-typescript/v3Dot2

Usage

import { transformOpenApiToTypeScript } from '@inversifyjs/open-api-2-typescript/v3Dot1';

const typeScript = transformOpenApiToTypeScript({
  components: {
    schemas: {
      User: {
        properties: {
          id: { type: 'string' },
        },
        required: ['id'],
        type: 'object',
      },
    },
  },
  info: { title: 'API', version: '1.0.0' },
  openapi: '3.1.0',
});