has_comment_api_test.api 335 B

1234567891011121314151617181920
  1. type Inline struct {
  2. }
  3. type Request struct {
  4. Inline
  5. Name string `path:"name,options=you|me"` // name in path
  6. }
  7. type Response struct {
  8. Message string `json:"msg"` // message
  9. }
  10. service A-api {
  11. @doc ("helloworld")
  12. @server(
  13. handler: GreetHandler
  14. )
  15. get /greet/from/:name(Request) returns (Response)
  16. }