Skip to content

Commit

Permalink
readme: added more precise messages
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenQuim committed Feb 16, 2024
1 parent 48c824c commit 3b2df76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ type MyInput struct {
Name string `json:"name" validate:"required"`
}

// Will be called just before returning c.Body()
func (r *MyInput) InTransform(context.Context) error {
r.Name = strings.ToLower(r.Name)

Expand All @@ -115,11 +116,11 @@ import "github.com/go-fuego/fuego"
func main() {
s := fuego.NewServer()

// With more typed OpenAPI options than the ones deduced by the controller
// Custom OpenAPI options that cannot be deduced by the controller signature
fuego.Post(s, "/", myController).
WithDescription("This route does something").
WithSummary("This is my summary").
SetTags("MyTag").
SetTags("MyTag"). // A tag is set by default according to the return type (can be desactivated)
SetDeprecated()

s.Run()
Expand Down

0 comments on commit 3b2df76

Please sign in to comment.