Skip to content

square-it/asyncapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asyncapi

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 ".")

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

About

Flogo extensions to support AsyncAPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%