New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nx-openapi-codegen

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nx-openapi-codegen

Built on top of [Kubb](https://www.kubb.dev), **nx-openapi-codegen** transforms an OpenAPI spec into a fully scoped NX monorepo for your GitHub organization or repository. Provide a URL or local path to your spec, and instantly generate.

latest
Source
npmnpm
Version
0.0.29
Version published
Maintainers
1
Created
Source

nx-openapi-codegen

Built on top of Kubb, nx-openapi-codegen transforms an OpenAPI spec into a fully scoped NX monorepo for your GitHub organization or repository. Provide a URL or local path to your spec, and instantly generate.

Note

This is useful for now, but if it were to be a real CLI, there would be a ton of things to change - there is a checklist for this in docs/todo.md. Hard dependencies on nx should be reconsidered for example.

Autogenerated SDKs

  • TypeScript Types
  • Mocks
    • Faker mocks (constant or randomized)
    • MSW handlers (constant or randomized responses)
  • HTTP Clients
  • Validation
  • Definitions
    • OpenAPI Schema JSON definitions

You’ll also get publishable GitHub npm packages for TypeScript (publishing setup is currently limited to TypeScript), and optional Swift & Kotlin (Android) scaffolds are available for multi-platform projects (publishing not yet configured).

Automatic GitHub Workflows

By default, the tool creates helpful GitHub Actions workflows to streamline development:

  • main.yml: Runs on pushes to main (basic CI steps).
  • pull-request.yml: Validates pull requests (linting, code generation, docs).
  • release.yml: Manually triggers (via workflow_dispatch) for publishing TypeScript packages.
  • update-models.yml: Periodically (on a cron schedule) regenerates all models and opens a pull request with any changes—perfect for a spec that has changed (usefu for open api docs that are deployed and change on a regular basis.

Prerequisites

  • Bun (>=v1.2 recommended)

Usage

bunx nx-openapi-codegen

Follow the interactive prompts to specify your GitHub organization, repository, and OpenAPI spec path (remote or local). nx-openapi-codegen will take care of the rest—so you can focus on building applications, not boilerplate.

FAQs

Package last updated on 28 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts