
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
openapi-parse
Advanced tools
Basic parser for OpenAPI specs. This is a thin wrapper around existing libraries. If you need more power/flexibility, check out Swagger/OpenAPI Parser, JSON Schema $Ref Parser, or swagger2openapi.
npm i openapi-parse
or
yarn add openapi-parse
import parse from 'openapi-parse'
// or const parse = require('openapi-parse').default
const options = { ... }
const specPathOrSchemaObject = ... // specify Swagger/OpenAPI spec path or a loaded schema object
const result = await parse(options)(specPathOrSchemaObject)
| Option | Default Value | Description |
|---|---|---|
basePath | null | Used as the base path for relative references within the spec. |
dereference | false | If set to true, all references (including internal references) will be fully dereferenced. If set to false, all external references will be dereferenced, but internal references will remain. |
upgrade.enabled | false | If enabled, OpenAPI 2.0 specs will be automatically upgraded to OpenAPI 3.0 using swagger2openapi. |
upgrade.options | {} | These options are passed down to swagger2openapi. More info. |
parser.canParse | fileInfo => false | Receives { path, extension, data } about referenced content. You can override and return true if you can parse the provided file information. More info. |
parser.parse | async fileInfo => {} | Receives { path, extension, data } about referenced content. You can override to implement a parser for the specified content. More info. |
resolver.canResolve | fileInfo => false | Receives { path, extension } about referenced content. You can override and return true if you are able to resolve the path. More info. |
resolver.resolve | async fileInfo => {} | Receives { path, extension } about referenced content. You can override to implement a resolver for the specified content. More info. |
FAQs
Basic parser for OpenAPI specs
The npm package openapi-parse receives a total of 11 weekly downloads. As such, openapi-parse popularity was classified as not popular.
We found that openapi-parse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.