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

@acrontum/oas-codegen-parser

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acrontum/oas-codegen-parser

OpenAPI schema parser / mapper for codegen tools

latest
Source
npmnpm
Version
1.2.4
Version published
Maintainers
7
Created
Source

Table of Contents generated with DocToc

Typegen

OpenAPI schema parser / mapper for codegen tools. Walks an opanpi v3 schema and produces an intermediate schema for consumption by generators (not included).

Early alhpa - docs subject to change.

Install

Install from src (pre-release)

npm install
npm run build
npm pack
# from consumer project: npm i -D /path/to/oas-typegen-0.0.1.tgz

post-release:

npm install --save-dev @acrontum/oas-typegen

Quickstart

By default, oas-typegen will dump the parsed spec to stdout which can then be used for codegen:

npx oas-typegen api.json >typegen.json

Note that it will not convert yaml to json, and only accepts schema 3.x, and does not validate the schema either. If you want to convert to json or validate / version upgrade, you can use any number of existing tools to do so (eg swagger editor).

Examples

npm i
npm run build -- -p tsconfig.examples.json
node ./dist/examples/generators/node-typescript.js ./examples/inputs/spec.json ./outputs/typings/node-typescript/
node ./dist/examples/generators/class-validator.js ./examples/inputs/spec.json ./outputs/typings/class-validator/

FAQs

Package last updated on 11 Jun 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