update api template (#156)

* update template

* update template
master
Keson 4 years ago committed by GitHub
parent cf2d20a211
commit 6dbd3eada9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,8 +15,8 @@ import (
const apiTemplate = `info( const apiTemplate = `info(
title: // TODO: add title title: // TODO: add title
desc: // TODO: add description desc: // TODO: add description
author: {{.gitUser}} author: "{{.gitUser}}"
email: {{.gitEmail}} email: "{{.gitEmail}}"
) )
type request struct { type request struct {
@ -28,14 +28,10 @@ type response struct {
} }
service {{.serviceName}} { 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) 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) post /users/create(request)
} }
` `

Loading…
Cancel
Save