asyncapi

command module
v0.0.0-...-a912c2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

README

asyncapi

AsyncAPI to flogo app converter tool converts given AsyncAPI spec to its implementation based on flogo api/descriptor model using the Microgateway Action.

Currently this tool accepts below arguments.

Usage of asyncapi:
  -type string
        conversion type like flogoapiapp or flogodescriptor (default "flogoapiapp")
  -role string
        server or client; defaults to server
  -input string
        input async api file (default "asyncapi.yml")
  -output string
        path to store generated file (default ".")

Setup

To install the tool, simply open a terminal and enter the below commands

git clone https://github.com/project-flogo/asyncapi.git
cd asyncapi/
go install

Usage

Flogo app api model.
cd asyncapi/
mdkir test
asyncapi -input examples/http/asyncapi.yml -type flogoapiapp -output test/

The resulting output is app.go which can be built into a working flogo application:

cd test
go build
./test
Flogo app descriptor model.
cd asyncapi/
asyncapi -input examples/http/asyncapi.yml -type flogodescriptor

The resulting output is flogo.json which can be built into a working flogo application:

flogo create -f flogo.json flogoapp
mv support.go flogoapp/src/
cd flogoapp
flogo build
./bin/flogoapp

Flogo Plugin Support

This tool can be integrated into flogocli.

# Install your plugin
$ flogo plugin install github.com/project-flogo/asyncapi/cmd

# Run your new plugin command for api app model
$ flogo asyncapi -i asyncapi.yml -t flogoapiapp  -o test/

# Run your new plugin command for descriptor app model
$ flogo asyncapi -i asyncapi.yml -t flogodescriptor

# Remove your plugin
$ flogo plugin remove github.com/project-flogo/asyncapi/cmd

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
examples
eftl command
websocket command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL