Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

anz-bank/syslgen-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b7cba4d · Sep 30, 2019

History

28 Commits
Sep 30, 2019
Aug 7, 2019
Aug 7, 2019
Jul 30, 2019
Sep 30, 2019
Jul 30, 2019
Aug 7, 2019
Sep 30, 2019
Jul 30, 2019
Apr 2, 2019
Apr 2, 2019
Sep 2, 2019
Feb 27, 2019
Apr 2, 2019

Repository files navigation

SYSLGEN Examples

Examples of rest api code generation using syslgen.

See examples/todos.sysl for the rest api description that has been created for the following service : http://jsonplaceholder.typicode.com/

How to build code

Get syslgen binary

syslgen is expected to be available as a download in near future.

Currently the only way to get syslgen binary is by building it like so:

Assumes you have Go installed.

export GOPATH=$HOME/gopath
export SYSLBASE=$HOME/gopath/src/github.com/anz-bank
mkdir -p $SYSLBASE
cd $SYSLBASE
git clone https://github.com/anz-bank/sysl/
cd $SYSLBASE/sysl/sysl2
go get -t -v github.com/anz-bank/sysl/sysl2/sysl
go install -v
ln -s $GOPATH/bin/sysl syslgen

Build code

Checkout the code and run the following commands in the root of the repository.

make

The make command will generate todos/service.go and build the binary todos/todos

Try to run the example like so:

./todos/todos

This client calls the generated service method GET_todos_id.