From 06f90f7bd3b04314393ceee8b37b9f0eaeeca5c2 Mon Sep 17 00:00:00 2001 From: thedae Date: Tue, 10 Dec 2024 16:58:29 +0100 Subject: [PATCH] Enabling yaml output encoding Signed-off-by: thedae --- router/gin/render.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router/gin/render.go b/router/gin/render.go index e592985fa..47fe0fd4e 100644 --- a/router/gin/render.go +++ b/router/gin/render.go @@ -71,10 +71,10 @@ func getWithFallback(key string, fallback Render) Render { } func negotiatedRender(c *gin.Context, response *proxy.Response) { - switch c.NegotiateFormat(gin.MIMEJSON, gin.MIMEPlain, gin.MIMEXML) { + switch c.NegotiateFormat(gin.MIMEJSON, gin.MIMEPlain, gin.MIMEXML, gin.MIMEYAML) { case gin.MIMEXML: getWithFallback(XML, jsonRender)(c, response) - case gin.MIMEPlain: + case gin.MIMEPlain, gin.MIMEYAML: getWithFallback(YAML, jsonRender)(c, response) default: getWithFallback(encoding.JSON, jsonRender)(c, response)