From 6dbd3eada92c3fee53a2b072f77e6afe355fb14d Mon Sep 17 00:00:00 2001 From: Keson Date: Fri, 23 Oct 2020 14:42:57 +0800 Subject: [PATCH] update api template (#156) * update template * update template --- tools/goctl/api/apigen/gen.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/goctl/api/apigen/gen.go b/tools/goctl/api/apigen/gen.go index 5d50cbf8..f31bf63e 100644 --- a/tools/goctl/api/apigen/gen.go +++ b/tools/goctl/api/apigen/gen.go @@ -15,8 +15,8 @@ import ( const apiTemplate = `info( title: // TODO: add title desc: // TODO: add description - author: {{.gitUser}} - email: {{.gitEmail}} + author: "{{.gitUser}}" + email: "{{.gitEmail}}" ) type request struct { @@ -28,14 +28,10 @@ type response struct { } service {{.serviceName}} { - @server( - handler: // TODO: set handler name and delete this comment - ) + @handler // TODO: set handler name and delete this comment get /users/id/:userId(request) returns(response) - @server( - handler: // TODO: set handler name and delete this comment - ) + @handler // TODO: set handler name and delete this comment post /users/create(request) } `