From 3b2df76cd95ad10adae395415b7771418fde20eb Mon Sep 17 00:00:00 2001 From: EwenQuim Date: Fri, 16 Feb 2024 18:48:18 +0100 Subject: [PATCH] readme: added more precise messages --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 720184a9..4756d1bc 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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()