json-yaml-ref-resolver
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

json-yaml-ref-resolver

npm version License: MIT

Simple $ref keyword resolver on json and yaml files.

Motivation

This app is mainly for merging split OpenApi(Swagger) files. Splitting API definitions into several files is human readable, but uniting definition files are required when defining APIs like AWS API Gateway. In addition, Swagger Editor is not supported $ref descriptions of remote references yet.

There are some $ref resolvers for json like this, but there doesn't seem to be them for yaml. So, I developed this app.

Installation

npm i -g json-yaml-ref-resolver

Usage

Please just specify a entry point file as <targetFilePath> and a merged file as <outputFilepath>.

ref-resolver [options] <targetFilePath> <outputFilePath>

Options:
  -i, --indent <size>  change indent size (default: 2)

This app simply expands all $ref descriptions and yaml references(* and & descriptions), so merged files become redundant.

Package Sidebar

Install

npm i json-yaml-ref-resolver

Weekly Downloads

135

Version

0.0.11

License

MIT

Unpacked Size

19.7 kB

Total Files

16

Last publish

Collaborators

  • en-ken