// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/artists": { "get": { "produces": [ "application/json" ], "tags": [ "artist" ], "summary": "List all artists", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/artists/:id": { "get": { "produces": [ "application/json" ], "tags": [ "artist" ], "summary": "List artist by ID", "parameters": [ { "type": "string", "description": "Artist ID (UUID)", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object", "additionalProperties": true } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/create": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Create a user", "parameters": [ { "description": "User payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateUserRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/handlers.CreateUserResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Log in with email and password", "parameters": [ { "description": "Login payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.LoginResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "Get username by user ID", "parameters": [ { "type": "string", "description": "User ID (UUID)", "name": "id", "in": "path", "required": true } ], "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" } } } } } }, "definitions": { "handlers.CreateUserRequest": { "type": "object", "required": [ "password", "user_mail", "user_name" ], "properties": { "password": { "type": "string", "minLength": 12 }, "user_mail": { "type": "string" }, "user_name": { "type": "string" } } }, "handlers.CreateUserResponse": { "type": "object", "properties": { "id": { "type": "string" }, "message": { "type": "string" } } }, "handlers.ErrorResponse": { "type": "object", "properties": { "error": { "type": "string" } } }, "handlers.LoginRequest": { "type": "object", "required": [ "password", "user_mail" ], "properties": { "password": { "type": "string" }, "user_mail": { "type": "string" } } }, "handlers.LoginResponse": { "type": "object", "properties": { "token": { "type": "string" } } }, "handlers.UsernameResponse": { "type": "object", "properties": { "user_name": { "type": "string" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "", BasePath: "/api/v1/", Schemes: []string{}, Title: "Music Index API", Description: "API for managing users and artists in Music Index.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }