Skip to content

pointlander/asyncapi-flogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asyncapi-flogo

AsynAPI to flogo app converter tool converts given AsynAPI spec to its implementation based on flogo api/descriptor model.

Currently this tool accepts below arguments.

Usage of asyncapi-flogo:
  -type string
        conversion type like flogoapiapp or flogodescriptor (default "flogoapiapp")
  -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/pointlander/asyncapi-flogo.git
cd asyncapi-flogo/
go install

Usage

Flogo app api model.

cd asyncapi-flogo/
mdkir test
asyncapi-flogo -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-flogo/
asyncapi-flogo -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/pointlander/asyncapi-flogo/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/pointlander/asyncapi-flogo/cmd

About

Converts async api into a flogo application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages