New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

openapi-yaml

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-yaml

This library manages a split openapi yaml file.

latest
npmnpm
Version
1.1.3
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

openapi-yaml

This library manages a split openapi yaml file.

Extended syntax

This library uses $dir to manage split yaml files.

$dir is a property that converts yml under the target directory to object according to the directory structure.

file structure

  • A
    • B
      • C.yml

C.yml

example: Example

output $dir

{
  A: {
    B: {
      C: {
        example: 'Example'  
      }  
    }  
  }
}

Special notation

@ Is used as a special character in this library.

file structure

  • A
    • @B
      • C.yml

C.yml

example: Example

output $dir

{
  A: {
    '/B': {
      C: {
        example: 'Example'
      }  
    }  
  }
}

Cli options

openapi-yaml <yaml> [options]

command

namerequiredtypedescription
yamltrueStringPath of root yaml file

options

namealiasrequiredtypedescription
outputotrueStringOutput Path of combined yaml file

Get started

node

install

yarn

yarn add -D openapi-yaml

npm

npm install -D openapi-yaml

usage

cli

openapi-yaml ./main.yml -o ./merged.yml  

docker

docker run --rm -v $(pwd):/home tanmen/openapi-yaml ./main.yml -o ./merged.yml  

Issue

If you find a problem, please report it on Issue, and we will fix it.

Contributes

If you would like to cooperate with the development, please create a PR and participate.

License

MIT License

Keywords

openapi

FAQs

Package last updated on 12 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts