openapi-flattener

1.0.3 • Public • Published

openapi-flattener

Install: npm install openapi-flattener --save -g

Usage: openapi-flattener -s oas-with-refs-and-nesting.yaml -o flattened-oas.yaml

Description

This package takes an OpenApi (yaml | json) file and flattens all references in the file. This is done largely with the help of existing packages json-schema-ref-parser and json-schema-merge-allof. The file is de-referenced and the result of that is post-processed, where appropriate elements from an OAS is merged so that inherited fields are lifted to the object level where they are used.

The purpose of this flattening is to be able to use an OAS document with various tools that doesn't handle references.

/openapi-flattener/

    Package Sidebar

    Install

    npm i openapi-flattener

    Weekly Downloads

    594

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    7.28 kB

    Total Files

    4

    Last publish

    Collaborators

    • hsiieqn