openapi-route-expander
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

OpenAPI Ref Resolver

Build Status License codecov

A TypeScript utility for resolving $ref in OpenAPI YAML routes, generating new YAML files without $ref, ready for OpenAPI processing.

Table of Contents

Features

  • $ref Resolution: Automatically resolves $ref within OpenAPI YAML routes.
  • YAML Processing: Reads and writes YAML files seamlessly.
  • TypeScript Support: Fully typed and written in TypeScript.
  • Easy Integration: Simple API for integrating into existing projects.

Installation

You can install the package using npm:

npm install openapi-ref-resolver

Or with yarn:

yarn add openapi-ref-resolver

Usage

Here’s an example of how to use the resolveRefsInRoutes function:

import { resolveRefsInRoutes } from 'openapi-ref-resolver';

const inputFilePath = '/absolute/path/to/your/input.yaml';
const outputFilePath = '/absolute/path/to/your/output.yaml';

resolveRefsInRoutes(inputFilePath, outputFilePath);

Package Sidebar

Install

npm i openapi-route-expander

Weekly Downloads

27

Version

0.0.3

License

MIT

Unpacked Size

22.4 kB

Total Files

24

Last publish

Collaborators

  • yog27ray