add godotenv, regenerate swagger docs
This commit is contained in:
+4
-4
@@ -15,7 +15,7 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/artist/getAll": {
|
||||
"/artists": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -44,7 +44,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/create": {
|
||||
"/users/create": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -89,7 +89,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/getUserNameByID/{id}": {
|
||||
"/users/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -185,7 +185,7 @@ const docTemplate = `{
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.0",
|
||||
Host: "",
|
||||
BasePath: "/",
|
||||
BasePath: "/api/v1/",
|
||||
Schemes: []string{},
|
||||
Title: "Music Index API",
|
||||
Description: "API for managing users and artists in Music Index.",
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
"contact": {},
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"basePath": "/api/v1/",
|
||||
"paths": {
|
||||
"/artist/getAll": {
|
||||
"/artists": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/create": {
|
||||
"/users/create": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -82,7 +82,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/getUserNameByID/{id}": {
|
||||
"/users/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
||||
+29
-29
@@ -1,4 +1,4 @@
|
||||
basePath: /
|
||||
basePath: /api/v1/
|
||||
definitions:
|
||||
handlers.CreateUserRequest:
|
||||
properties:
|
||||
@@ -37,7 +37,7 @@ info:
|
||||
title: Music Index API
|
||||
version: "1.0"
|
||||
paths:
|
||||
/artist/getAll:
|
||||
/artists:
|
||||
get:
|
||||
produces:
|
||||
- application/json
|
||||
@@ -56,7 +56,33 @@ paths:
|
||||
summary: List all artists
|
||||
tags:
|
||||
- artist
|
||||
/user/create:
|
||||
/users/{id}:
|
||||
get:
|
||||
parameters:
|
||||
- description: User ID (UUID)
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.UsernameResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.ErrorResponse'
|
||||
summary: Get username by user ID
|
||||
tags:
|
||||
- user
|
||||
/users/create:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -85,30 +111,4 @@ paths:
|
||||
summary: Create a user
|
||||
tags:
|
||||
- user
|
||||
/user/getUserNameByID/{id}:
|
||||
get:
|
||||
parameters:
|
||||
- description: User ID (UUID)
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.UsernameResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/handlers.ErrorResponse'
|
||||
summary: Get username by user ID
|
||||
tags:
|
||||
- user
|
||||
swagger: "2.0"
|
||||
|
||||
Reference in New Issue
Block a user