Nacho Portmanteau Meltdown

    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

    Keywords

    Install

    npm i json-to-oas-component-cli

    DownloadsWeekly Downloads

    4

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    1.46 kB

    Total Files

    3

    Last publish

    Collaborators

    • mheap