From e97c926611c464ce0b65699157c034aab330448a Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Wed, 7 Aug 2019 14:54:33 +0300 Subject: [PATCH] Add license to swagger docs --- pkg/api/docs/docs.go | 14 +++++++------- pkg/api/docs/swagger.json | 12 ++++++------ pkg/api/docs/swagger.yaml | 12 ++++++------ pkg/api/main.go | 10 +++++++--- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/pkg/api/docs/docs.go b/pkg/api/docs/docs.go index a477429..b83662d 100644 --- a/pkg/api/docs/docs.go +++ b/pkg/api/docs/docs.go @@ -1,6 +1,6 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at -// 2019-08-07 14:14:05.35294 +0300 EEST m=+0.022146486 +// 2019-08-07 14:48:29.881959 +0300 EEST m=+0.022469914 package docs @@ -16,20 +16,20 @@ var doc = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { - "description": "{{.Description}}", + "description": "Go microservice template for Kubernetes.", "title": "Podinfo API", "contact": { - "name": "API Support", + "name": "Source Code", "url": "https://github.com/stefanprodan/podinfo" }, "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + "name": "MIT License", + "url": "https://github.com/stefanprodan/podinfo/blob/master/LICENSE" }, "version": "2.0" }, - "host": "{{.Host}}", - "basePath": "{{.BasePath}}", + "host": "localhost:9898", + "basePath": "/", "paths": { "/": { "get": { diff --git a/pkg/api/docs/swagger.json b/pkg/api/docs/swagger.json index 719f84f..56f23ed 100644 --- a/pkg/api/docs/swagger.json +++ b/pkg/api/docs/swagger.json @@ -1,20 +1,20 @@ { "swagger": "2.0", "info": { - "description": "{{.Description}}", + "description": "Go microservice template for Kubernetes.", "title": "Podinfo API", "contact": { - "name": "API Support", + "name": "Source Code", "url": "https://github.com/stefanprodan/podinfo" }, "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + "name": "MIT License", + "url": "https://github.com/stefanprodan/podinfo/blob/master/LICENSE" }, "version": "2.0" }, - "host": "{{.Host}}", - "basePath": "{{.BasePath}}", + "host": "localhost:9898", + "basePath": "/", "paths": { "/": { "get": { diff --git a/pkg/api/docs/swagger.yaml b/pkg/api/docs/swagger.yaml index 3386225..68cd5a9 100644 --- a/pkg/api/docs/swagger.yaml +++ b/pkg/api/docs/swagger.yaml @@ -1,4 +1,4 @@ -basePath: '{{.BasePath}}' +basePath: / definitions: api.ArrayResponse: items: {} @@ -43,15 +43,15 @@ definitions: token_name: type: string type: object -host: '{{.Host}}' +host: localhost:9898 info: contact: - name: API Support + name: Source Code url: https://github.com/stefanprodan/podinfo - description: '{{.Description}}' + description: Go microservice template for Kubernetes. license: - name: Apache 2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + name: MIT License + url: https://github.com/stefanprodan/podinfo/blob/master/LICENSE title: Podinfo API version: "2.0" paths: diff --git a/pkg/api/main.go b/pkg/api/main.go index 708cd0f..068adf6 100644 --- a/pkg/api/main.go +++ b/pkg/api/main.go @@ -2,12 +2,16 @@ package api // @title Podinfo API // @version 2.0 +// @description Go microservice template for Kubernetes. -// @contact.name API Support +// @contact.name Source Code // @contact.url https://github.com/stefanprodan/podinfo -// @license.name Apache 2.0 -// @license.url http://www.apache.org/licenses/LICENSE-2.0.html +// @license.name MIT License +// @license.url https://github.com/stefanprodan/podinfo/blob/master/LICENSE + +// @host localhost:9898 +// @BasePath / type ArrayResponse []string type MapResponse map[string]string