json-yaml-ref-resolver
v0.0.11
Published
Simple '$ref' key resolver on json and yaml files.
Readme
json-yaml-ref-resolver
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-resolverUsage
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.
