Skip to content

Commit

Permalink
Merge pull request #37 from uber/lu.thrift
Browse files Browse the repository at this point in the history
Annotate baz client/endpoint thrift
  • Loading branch information
ChuntaoLu committed Apr 5, 2017
2 parents b799908 + da598e9 commit 37411f1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
Expand Up @@ -19,9 +19,19 @@ exception NewErr {
}

service SimpleService {
BazResponse Call(1: required BazRequest arg)
void Simple() throws (1: SimpleErr simpleErr)
void SimpleFuture() throws (1: SimpleErr simpleErr, 2: NewErr newErr)

BazResponse Call(
1: required BazRequest arg
)

void Simple() throws (
1: SimpleErr simpleErr
)

void SimpleFuture() throws (
1: SimpleErr simpleErr
2: NewErr newErr
)
}

// service SecondService {
Expand Down
Expand Up @@ -19,9 +19,34 @@ exception NewErr {
}

service SimpleService {
BazResponse Call(1: required BazRequest arg)
void Simple() throws (1: SimpleErr simpleErr)
void SimpleFuture() throws (1: SimpleErr simpleErr, 2: NewErr newErr)

BazResponse Call(
1: required BazRequest arg
) (
zanzibar.http.status = "200"
zanzibar.http.method = "POST"
zanzibar.http.path = "/baz/call-path"
zanzibar.handler = "baz.call"
)

void Simple() throws (
1: SimpleErr simpleErr (zanzibar.http.status = "403")
) (
zanzibar.http.status = "204"
zanzibar.http.method = "GET"
zanzibar.http.path = "/baz/simple-path"
zanzibar.handler = "baz.simple"
)

void SimpleFuture() throws (
1: SimpleErr simpleErr (zanzibar.http.status = "403")
2: NewErr newErr (zanzibar.http.status = "404")
) (
zanzibar.http.status = "204"
zanzibar.http.method = "GET"
zanzibar.http.path = "/baz/simple-future-path"
zanzibar.handler = "baz.simpleFuture"
)
}

// service SecondService {
Expand Down

0 comments on commit 37411f1

Please sign in to comment.