mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-09 16:10:00 +08:00
30 lines
423 B
Plaintext
30 lines
423 B
Plaintext
|
|
type Foo {}
|
||
|
|
|
||
|
|
@server(
|
||
|
|
foo: foo
|
||
|
|
bar: "bar"
|
||
|
|
fooBar: "foo
|
||
|
|
bar"
|
||
|
|
)
|
||
|
|
service foo-api {
|
||
|
|
@doc("foo")
|
||
|
|
@handler foo
|
||
|
|
get /foo (Foo) returns (Foo)
|
||
|
|
@handler bar
|
||
|
|
post /foo (Foo)
|
||
|
|
@handler fooBar
|
||
|
|
post /foo/bar
|
||
|
|
@server(
|
||
|
|
handler: getFoo
|
||
|
|
)
|
||
|
|
post /foo/:id returns(Foo)
|
||
|
|
}
|
||
|
|
|
||
|
|
service foo-api {
|
||
|
|
@doc(
|
||
|
|
summary:"post foo"
|
||
|
|
)
|
||
|
|
@handler postFoo
|
||
|
|
post /foo/bar/post (Foo)
|
||
|
|
}
|