From fe7b7f97b45bf929fdf6a5d0fcb01fa77e1c4779 Mon Sep 17 00:00:00 2001 From: dylanhitt Date: Fri, 13 Dec 2024 16:59:14 -0500 Subject: [PATCH] deprecate: deprecate AddError in favor of AddResponse --- option.go | 1 + option/option.go | 1 + 2 files changed, 2 insertions(+) diff --git a/option.go b/option.go index 1d8b94f5..0acaec64 100644 --- a/option.go +++ b/option.go @@ -294,6 +294,7 @@ func OptionDeprecated() func(*BaseRoute) { // AddError adds an error to the route. // It replaces any existing error previously set with the same code. // Required: should only supply one type to `errorType` +// Deprecated: Use `OptionAddResponse` instead func OptionAddError(code int, description string, errorType ...any) func(*BaseRoute) { var responseSchema SchemaTag return func(r *BaseRoute) { diff --git a/option/option.go b/option/option.go index c9db4d02..17dd30f0 100644 --- a/option/option.go +++ b/option/option.go @@ -146,6 +146,7 @@ var OperationID = fuego.OptionOperationID var Deprecated = fuego.OptionDeprecated // AddError adds an error to the route. +// Deprecated: Use `AddResponse` instead. var AddError = fuego.OptionAddError // AddResponse adds a response to a route by status code