private/apigen/example: Add description to endpoint

Add the description field to the endpoint to show where it ends up when
generating code.

Change-Id: I415f088dbf795656ed1ef042ed41ebf39a517692
This commit is contained in:
Ivan Fraixedes 2023-09-19 18:12:34 +02:00 committed by Storj Robot
parent e599df03a8
commit 926076bffd
2 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@
<h3 id='documents-update-content'>Update Content (<a href='#list-of-endpoints'>go to full list</a>)</h3>
Update the content of the document with the specified path and ID if the last update is before the indicated date
`POST /api/v0/docs/{path}`

View File

@ -19,8 +19,9 @@ func main() {
g := a.Group("Documents", "docs")
g.Post("/{path}", &apigen.Endpoint{
Name: "Update Content",
MethodName: "UpdateContent",
Name: "Update Content",
Description: "Update the content of the document with the specified path and ID if the last update is before the indicated date",
MethodName: "UpdateContent",
Response: struct {
ID uuid.UUID `json:"id"`
Date time.Time `json:"date"`