From 4e11746c32d0622649d52de96a6cc61a3f604d93 Mon Sep 17 00:00:00 2001 From: grumbulon Date: Fri, 20 Jan 2023 16:55:59 -0500 Subject: [PATCH] small doc fixes --- docs/docs.go | 10 +++++----- docs/swagger.json | 10 +++++----- docs/swagger.yaml | 10 +++++----- internal/api/auth.go | 2 +- internal/api/zone.go | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index ea1a216..2b132ad 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -33,7 +33,7 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "Account ID", + "description": "Username", "name": "username", "in": "query", "required": true @@ -83,14 +83,14 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "Zonefile", + "description": "Zonefile name", "name": "filename", "in": "query", "required": true }, { "type": "string", - "description": "authToken", + "description": "Bearer Token", "name": "Authorization", "in": "header", "required": true @@ -133,14 +133,14 @@ const docTemplate = `{ "parameters": [ { "type": "file", - "description": "Zonefile", + "description": "Zonefile to upload", "name": "file", "in": "formData", "required": true }, { "type": "string", - "description": "authToken", + "description": "Bearer Token", "name": "Authorization", "in": "header", "required": true diff --git a/docs/swagger.json b/docs/swagger.json index 11ba8ac..0b8a0e3 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -24,7 +24,7 @@ "parameters": [ { "type": "string", - "description": "Account ID", + "description": "Username", "name": "username", "in": "query", "required": true @@ -74,14 +74,14 @@ "parameters": [ { "type": "string", - "description": "Zonefile", + "description": "Zonefile name", "name": "filename", "in": "query", "required": true }, { "type": "string", - "description": "authToken", + "description": "Bearer Token", "name": "Authorization", "in": "header", "required": true @@ -124,14 +124,14 @@ "parameters": [ { "type": "file", - "description": "Zonefile", + "description": "Zonefile to upload", "name": "file", "in": "formData", "required": true }, { "type": "string", - "description": "authToken", + "description": "Bearer Token", "name": "Authorization", "in": "header", "required": true diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 2e4dd12..f8f707e 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -39,7 +39,7 @@ paths: - application/json description: login parameters: - - description: Account ID + - description: Username in: query name: username required: true @@ -70,12 +70,12 @@ paths: description: parse your zonefile -- you must specify "Bearer" before entering your token parameters: - - description: Zonefile + - description: Zonefile name in: query name: filename required: true type: string - - description: authToken + - description: Bearer Token in: header name: Authorization required: true @@ -103,12 +103,12 @@ paths: description: upload a file -- you must specify "Bearer" before entering your token parameters: - - description: Zonefile + - description: Zonefile to upload in: formData name: file required: true type: file - - description: authToken + - description: Bearer Token in: header name: Authorization required: true diff --git a/internal/api/auth.go b/internal/api/auth.go index 20fb468..f3e7c4e 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -36,7 +36,7 @@ type httpInternalServerError struct { // @Tags accounts // @Accept json // @Produce json -// @Param username query string true "Account ID" +// @Param username query string true "Username" // @Param password query string true "Password" // @Success 200 {object} httpSuccess // @Failure 401 {object} httpError diff --git a/internal/api/zone.go b/internal/api/zone.go index 9360d3e..753b3ae 100644 --- a/internal/api/zone.go +++ b/internal/api/zone.go @@ -38,10 +38,10 @@ type Zone struct { // @Tags DNS // @Accept mpfd // @Produce json -// @Param file formData file true "Zonefile" +// @Param file formData file true "Zonefile to upload" // @Success 200 {object} httpSuccess // @Failure 500 {object} httpInternalServerError -// @Param Authorization header string true "authToken" +// @Param Authorization header string true "Bearer Token" // // @Security Bearer // @@ -102,10 +102,10 @@ func ReceiveFile(w http.ResponseWriter, r *http.Request) { // @Tags DNS // @Accept mpfd // @Produce json -// @Param filename query string true "Zonefile" +// @Param filename query string true "Zonefile name" // @Success 200 {object} httpSuccess // @Failure 500 {object} httpInternalServerError -// @Param Authorization header string true "authToken" +// @Param Authorization header string true "Bearer Token" // // @Security Bearer //