service foo {
    @handler root
    get /

    @handler bar
    get /ping

    @handler bar
    get /ping;
}

service bar {
    @doc "bar"
    @handler root
    get / (Foo)

    @doc "bar"
    @handler root2
    get / returns (Foo)

    @doc "bar"
    @handler root3
    get / (Foo) returns (Bar)

    @doc "bar"
    @handler foo
    get /foo/:bar (Foo)

    @doc "bar"
    @handler foo
    get /foo/:bar (Foo) returns ();

    @handler foo
    get /foo/:bar returns (Foo)

    @handler foo
    get /foo/:bar () returns (Foo);
}

service baz-api {
    @handler foo
    post /foo/:bar/foo-bar-baz (Foo) returns (*Bar)

    @handler foo
    post /foo/:bar/foo-bar-baz (Foo) returns (*Bar);

    @handler bar
    post /foo ([]Foo) returns ([]*Bar)

    @handler bar
    post /foo ([]Foo) returns ([]*Bar);
}
