From 48c824cdb59d2e5dbf8d26a4a3e191d3c940cd2f Mon Sep 17 00:00:00 2001 From: EwenQuim Date: Fri, 16 Feb 2024 15:41:06 +0100 Subject: [PATCH] Added more OpenAPI options for the controller --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index c6e9c71c..720184a9 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,27 @@ func (r *MyInput) InTransform(context.Context) error { ``` +### More OpenAPI documentation + +```go +package main + +import "github.com/go-fuego/fuego" + +func main() { + s := fuego.NewServer() + + // With more typed OpenAPI options than the ones deduced by the controller + fuego.Post(s, "/", myController). + WithDescription("This route does something"). + WithSummary("This is my summary"). + SetTags("MyTag"). + SetDeprecated() + + s.Run() +} +``` +
All features