json-to-oas-component-cli

1.0.2 • Public • Published

This tool reads JSON on stdin and generates Open API Spec components based on the data types it finds. It's very basic at the moment, but it's a great starting point to start modifying by hand

Installation

npm install -f json-to-oas-component-cli

Usage

echo '{"foo":"bar", "baz": [{"hello":"world"}]}' | node json-to-oas-component
components:
  schemas:
    AnonymousObject:
      foo:
        type: string
        maxLength: 32
        description: Description goes here
        example: bar
      baz:
        type: array
        items:
          type: object
          properties:
            hello:
              type: string
              maxLength: 32
              description: Description goes here
              example: world

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i json-to-oas-component-cli

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

1.46 kB

Total Files

3

Last publish

Collaborators

  • mheap