Installing ApiDOM

The @speclynx/apidom-reference package is one of the main entry points for working with ApiDOM. Among other capabilities, it can parse any supported API specification into a semantic data model.

npm install @speclynx/apidom-reference

Requires Node.js >=16.14.2. The package ships with TypeScript type definitions out of the box.

Try it out

Parse an API specification and access its data model right away:

import { parse } from '@speclynx/apidom-reference';

const result = await parse('/path/to/openapi.json');

result.api.info.title; // document title
result.api.info.version; // document version

See the Parsing page for more options including source maps, style preservation, and parsing from strings.