Skip to content

Commit

Permalink
private/apigen/example: Add description to endpoint
Browse files Browse the repository at this point in the history
Add the description field to the endpoint to show where it ends up when
generating code.

Change-Id: I415f088dbf795656ed1ef042ed41ebf39a517692
  • Loading branch information
ifraixedes authored and Storj Robot committed Sep 19, 2023
1 parent e599df0 commit 926076b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion private/apigen/example/apidocs.gen.md
Expand Up @@ -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}`

Expand Down
5 changes: 3 additions & 2 deletions private/apigen/example/gen.go
Expand Up @@ -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"`
Expand Down

0 comments on commit 926076b

Please sign in to comment.