From 5b79cf15a0226dc3dad5053615ee652823376cd3 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 19 May 2022 10:27:31 -0700 Subject: Swagger refactor/cleanup * Remove duplicate or unused types and constants * Move all documetation-only models and responses into swagger package * Remove all unecessary names, go-swagger will determine names from struct declarations * Use Libpod suffix to differentiate between compat and libpod models and responses. Taken from swagger:operation declarations. * Models and responses that start with lowercase are for swagger use only while uppercase are used "as is" in the code and swagger comments * Used gofumpt on new code ```release-note ``` Signed-off-by: Jhon Honce --- pkg/api/handlers/compat/version.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/api/handlers/compat/version.go') diff --git a/pkg/api/handlers/compat/version.go b/pkg/api/handlers/compat/version.go index b113fbc90..cfc3468c2 100644 --- a/pkg/api/handlers/compat/version.go +++ b/pkg/api/handlers/compat/version.go @@ -57,13 +57,15 @@ func VersionHandler(w http.ResponseWriter, r *http.Request) { Version: conmon.Version, Details: map[string]string{ "Package": conmon.Package, - }}, + }, + }, { Name: fmt.Sprintf("OCI Runtime (%s)", oci.Name), Version: oci.Version, Details: map[string]string{ "Package": oci.Package, - }}, + }, + }, } components = append(components, additional...) } @@ -89,5 +91,6 @@ func VersionHandler(w http.ResponseWriter, r *http.Request) { MinAPIVersion: fmt.Sprintf("%d.%d", minVersion.Major, minVersion.Minor), Os: components[0].Details["Os"], Version: components[0].Version, - }}) + }, + }) } -- cgit v1.2.3-54-g00ecf