anz-bank / sysl-go

Communication library used by SYSL-generated code written in Go.
Apache License 2.0
10 stars 14 forks source link

After upgrading to arrai, return error <: Status is not supported. #196

Closed uynap closed 4 years ago

uynap commented 4 years ago

Please do not post any internal, closed source snippets on this public issue tracker!

Description

After using Arri, I just realised one of the feature is not supported. This one.https://github.com/anz-bank/sysl-go/blob/master/codegen/testdata/simple/simple.sysl#L38

It's supported in the downstream definition, but it's not supported if you use it in upstream sysl definition(bff.sysl).

For example, if you have something below in your bff.sysl, then the syslw will give you errors.

        /aaa:
            GET:
                return ok <: Aaa
        return error <: Status

        !type Status:
            statusField <: string

The error I got is as below:

ERRO[0000] codegen/model/bff.sysl has syntax errors

The sysl command is:

./syslw pb --mode json codegen/model/bff.sysl --output codegen/model/bff.sysl.json
uynap commented 4 years ago

my mistake. i put

!type Status:
            statusField <: string

in the middle with 2 endpoints definition.