AsynAPI to flogo app converter tool converts given AsynAPI 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")
-input string
input async api file (default "asyncapi.yml")
-output string
path to store generated file (default ".")
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
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
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
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