From 88c4f861d825c16e9859db159f5bd704f112eea9 Mon Sep 17 00:00:00 2001 From: Kareem Mahlees Date: Fri, 23 Feb 2024 19:55:37 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20change=20app=20name=20in=20swagger=20?= =?UTF-8?q?=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 13 ++++++++----- docs/swagger.json | 13 ++++++++----- docs/swagger.yaml | 12 +++++++----- main.go | 2 +- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 8f93cdf..0605b9d 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -220,7 +220,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/models.AddUpdateColumnPayload" + "$ref": "#/definitions/models.AddModifyColumnPayload" } } ], @@ -300,7 +300,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/models.AddUpdateColumnPayload" + "$ref": "#/definitions/models.AddModifyColumnPayload" } } ], @@ -327,7 +327,10 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/models.TableInfoResp" + "type": "array", + "items": { + "$ref": "#/definitions/models.TableInfoResp" + } } } } @@ -335,7 +338,7 @@ const docTemplate = `{ } }, "definitions": { - "models.AddUpdateColumnPayload": { + "models.AddModifyColumnPayload": { "type": "object", "required": [ "column_name", @@ -478,7 +481,7 @@ var SwaggerInfo = &swag.Spec{ Host: "localhost:5522", BasePath: "/", Schemes: []string{}, - Title: "MySQL Meta", + Title: "MetaX", Description: "A RESTFull and GraphQL API to manage your MySQL DB", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, diff --git a/docs/swagger.json b/docs/swagger.json index a343298..ee544cc 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "description": "A RESTFull and GraphQL API to manage your MySQL DB", - "title": "MySQL Meta", + "title": "MetaX", "contact": { "name": "Kareem Ebrahim", "email": "kareemmahlees@gmail.com" @@ -213,7 +213,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/models.AddUpdateColumnPayload" + "$ref": "#/definitions/models.AddModifyColumnPayload" } } ], @@ -293,7 +293,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/models.AddUpdateColumnPayload" + "$ref": "#/definitions/models.AddModifyColumnPayload" } } ], @@ -320,7 +320,10 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/models.TableInfoResp" + "type": "array", + "items": { + "$ref": "#/definitions/models.TableInfoResp" + } } } } @@ -328,7 +331,7 @@ } }, "definitions": { - "models.AddUpdateColumnPayload": { + "models.AddModifyColumnPayload": { "type": "object", "required": [ "column_name", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 10950ea..50e78a5 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,6 +1,6 @@ basePath: / definitions: - models.AddUpdateColumnPayload: + models.AddModifyColumnPayload: properties: column_name: type: string @@ -94,7 +94,7 @@ info: email: kareemmahlees@gmail.com name: Kareem Ebrahim description: A RESTFull and GraphQL API to manage your MySQL DB - title: MySQL Meta + title: MetaX version: "1.0" paths: /: @@ -226,7 +226,7 @@ paths: name: columnData required: true schema: - $ref: '#/definitions/models.AddUpdateColumnPayload' + $ref: '#/definitions/models.AddModifyColumnPayload' produces: - application/json responses: @@ -278,7 +278,7 @@ paths: name: columnData required: true schema: - $ref: '#/definitions/models.AddUpdateColumnPayload' + $ref: '#/definitions/models.AddModifyColumnPayload' produces: - application/json responses: @@ -297,7 +297,9 @@ paths: "200": description: OK schema: - $ref: '#/definitions/models.TableInfoResp' + items: + $ref: '#/definitions/models.TableInfoResp' + type: array tags: - Tables swagger: "2.0" diff --git a/main.go b/main.go index ad406bc..b60589b 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ import ( // Main // -// @title MySQL Meta +// @title MetaX // @version 1.0 // @description A RESTFull and GraphQL API to manage your MySQL DB // @contact.name Kareem Ebrahim