The `@readme/api` package provides a robust command-line interface and programmatic API for generating SDKs from OpenAPI (formerly Swagger) definitions. It takes an OpenAPI specification file and outputs a fully-typed JavaScript SDK, designed to be consistent across CommonJS, ES Modules, and TypeScript environments. The current stable version is `6.1.3`, with active development towards `v7.0.0`, which introduces significant overhauls to the SDK generation strategy, notably streamlining the process by removing complex configuration questions and enhancing type and module resolution. This package differentiates itself by offering a complete SDK generation pipeline that handles schema imports and type safety, aiming to provide a 'just works' experience for developers integrating with OpenAPI-driven APIs. Its release cadence is active, with minor and patch updates regularly addressing fixes and quality-of-life improvements, while major versions introduce breaking changes and significant architectural shifts.
npm install apiVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically generate a TypeScript-ready SDK from a dummy OpenAPI specification using the `generate` function, then cleans up the temporary files. This is runnable in a modern Node.js environment supporting ESM.
Upgrade your Node.js environment to version `20.10.0` or newer, or stick to a `v6.x` release for older Node.js versions.
Ensure your Node.js environment is version 16 or higher when using `v6.x` of the package.
Review the `v7.x` changelog and update your programmatic SDK generation calls, as previous configuration options may no longer be supported or necessary.
Upgrade to `@readme/api@6.1.3` or newer to ensure you have the latest security patches.
Upgrade your Node.js environment to the minimum required version (Node.js 16+ for v6.x, Node.js 20.10.0+ for v7.x).
For `v6.x`, use `const { symbol } = require('@readme/api');` for CommonJS environments. For modern setups or `v7.x` aiming for ESM consistency, ensure your `package.json` specifies `"type": "module"` or use a `.mjs` file extension.No dependency data recorded yet.