From 9f9462496ae69c69979f8c569be96ff42e509ce8 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 16 Sep 2022 13:18:50 +0200 Subject: [PATCH] Move swagger comment from TagJobApiRequest to Tag --- internal/api/rest.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/api/rest.go b/internal/api/rest.go index e0886c3..99e4493 100644 --- a/internal/api/rest.go +++ b/internal/api/rest.go @@ -112,13 +112,14 @@ type ErrorResponse struct { Error string `json:"error"` // Error Message } +// Tag model +// @Description Defines a tag using name and type. type Tag struct { + // Tag Type Type string `json:"type"` - Name string `json:"name"` + Name string `json:"name"` // Tag Name } -// TagJobApiRequest model -// @Description Array of tag-objects for request payload type TagJobApiRequest []*Tag func handleError(err error, statusCode int, rw http.ResponseWriter) {