From 4004ac9b925f6f9377533ce9ff349a5db681e7d4 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Thu, 20 Apr 2023 20:53:00 +0300 Subject: doc: add auth header fields (#34) --- docs/docs.go | 41 +++++++++++++++++++++++++++++++++++------ docs/swagger.json | 35 +++++++++++++++++++++++++++++++++-- docs/swagger.yaml | 27 ++++++++++++++++++++++++--- 3 files changed, 92 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/docs/docs.go b/docs/docs.go index 70a7267..5cf5e50 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,5 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs GENERATED BY SWAG; DO NOT EDIT +// This file was generated by swaggo/swag package docs import "github.com/swaggo/swag" @@ -147,12 +147,18 @@ const docTemplate = `{ ], "summary": "Post record with demo of a specific map.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "array", "items": { "type": "file" }, - "collectionFormat": "csv", "description": "Demos", "name": "demos", "in": "formData", @@ -230,6 +236,15 @@ const docTemplate = `{ "application/json" ], "summary": "Get profile page of session user.", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -272,6 +287,13 @@ const docTemplate = `{ ], "summary": "Update country code of session user.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "string", "description": "Country Code [XX]", @@ -321,6 +343,15 @@ const docTemplate = `{ "application/json" ], "summary": "Update profile page of session user.", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -555,11 +586,9 @@ var SwaggerInfo = &swag.Spec{ BasePath: "/v1", Schemes: []string{}, Title: "Least Portals Database API", - Description: "Backend API endpoints for Least Portals Database.", + Description: "Backend API endpoints for the Least Portals Database.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 861610b..82fb64c 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "description": "Backend API endpoints for Least Portals Database.", + "description": "Backend API endpoints for the Least Portals Database.", "title": "Least Portals Database API", "contact": {}, "license": { @@ -140,12 +140,18 @@ ], "summary": "Post record with demo of a specific map.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "array", "items": { "type": "file" }, - "collectionFormat": "csv", "description": "Demos", "name": "demos", "in": "formData", @@ -223,6 +229,15 @@ "application/json" ], "summary": "Get profile page of session user.", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -265,6 +280,13 @@ ], "summary": "Update country code of session user.", "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + }, { "type": "string", "description": "Country Code [XX]", @@ -314,6 +336,15 @@ "application/json" ], "summary": "Update profile page of session user.", + "parameters": [ + { + "type": "string", + "description": "JWT Token", + "name": "Authorization", + "in": "header", + "required": true + } + ], "responses": { "200": { "description": "OK", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index db0ab47..76b4e7b 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -93,7 +93,7 @@ definitions: host: lp.ardapektezol.com/api info: contact: {} - description: Backend API endpoints for Least Portals Database. + description: Backend API endpoints for the Least Portals Database. license: name: GNU General Public License, Version 2 url: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html @@ -175,8 +175,12 @@ paths: consumes: - multipart/form-data parameters: - - collectionFormat: csv - description: Demos + - description: JWT Token + in: header + name: Authorization + required: true + type: string + - description: Demos in: formData items: type: file @@ -228,6 +232,12 @@ paths: get: consumes: - application/json + parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string produces: - application/json responses: @@ -252,6 +262,12 @@ paths: post: consumes: - application/json + parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string produces: - application/json responses: @@ -277,6 +293,11 @@ paths: consumes: - application/json parameters: + - description: JWT Token + in: header + name: Authorization + required: true + type: string - description: Country Code [XX] in: query name: country_code -- cgit v1.2.3