Code Monkey home page Code Monkey logo

schemas-cli's Introduction

schemas-cli

CLI tool that lets you import OpenAPI definitions into Amazon EventBridge Schema registry. These schemas can then be used to generate code bindings in a variety of languages provided by quicktype.io

Installation

npm install -g @mhlabs/schemas-cli

Features

  • Imports OpenAPI 3 schemas from URL or file to EventBridge Schema Registry
  • Lets you browse all schema registries and generate code bindings in a large range of languages
  • Lets you browse your API Gateways and generate code bindings from any OpenAPI 3 schema you may have associated with your APIs
  • Fetch schema from URL or your local file system
  • Supports both YAML and JSON

Demo

!Demo

Browsing files on your local computer: !Demo

Commands

$ schemas import

Usage: index import|i [options]

Imports OpenAPI3 speficications from file or URL into Amazon EventBridge Schema Registry

Options:
  -f, --file [file-path]         OpenAPI Input file (optional. One of
                                 --file or --url has to be specified)
  -u, --url [url]                URL to OpenAPI definition (optional. One
                                 of --file or --url has to be specified)
  -r, --registry [registryName]  URL to OpenAPI definition (optional)
  -p, --profile [profile]        AWS profile to use
  --region [region]              The AWS region to use. Falls back on
                                 AWS_REGION environment variable if not
                                 specified
  -h, --help                     display help for command

$ schemas code-bindings

Usage: schemas code-bindings|cb [options]

Starts a schema registry browser and outputs code bindings

Options:
  -f, --file [filePath]            File path to OpenAPI definition (optional)
  -u, --url [url]                  URL to OpenAPI definition (optional)
  -l, --language [language]        Output language (optional)
  -o, --output-file [output-file]  Output file (optional. Writes to std-out if omitted)
  -p, --profile [profile]          AWS profile to use (default: "default")
  --region [region]                The AWS region to use. Falls back on AWS_REGION environment variable if not specified
  -h, --help                       display help for command
  

$ schemas create

Usage: schemas create|c [options]

Browses types in your project and lets you create schemas from them

Options:
  -t, --template [path]            Path to SAM template (optional)
  -e, --file-extension [extension] File extension filter (optional)
  -l, --language [language]        Output language (optional)
  -p, --profile [profile]          AWS profile to use (default: "default")
  --path [path]                    Root path
  --region [region]                The AWS region to use. Falls back on AWS_REGION environment variable if not specified
  -h, --help                       display help for command
  

schemas-cli's People

Contributors

carlsim0n avatar ljacobsson avatar maxbergs avatar stefan-karlsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.