// 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": { "/api/v1/application/{application_id}/tokens": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取应用程序的 Token 列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "applications" ], "summary": "获取应用程序的 Token 列表", "parameters": [ { "type": "integer", "name": "application_id", "in": "path" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/schema.ResponseBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/entity.ApplicationToken" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/schema.ResponseBody" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "获取应用程序的 Token 列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "applications" ], "summary": "获取应用程序的 Token 列表", "parameters": [ { "type": "integer", "name": "application_id", "in": "path" }, { "description": "创建应用程序的请求", "name": "ApplicationCreateRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/schema.ApplicationCreateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/schema.ResponseBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/entity.ApplicationToken" } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/schema.ResponseBody" } } } } }, "/api/v1/applications": { "get": { "security": [ { "ApiKeyAuth": [] } ], "description": "列出当前用户下的应用程序列表", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "applications" ], "summary": "List Applications", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/schema.ResponseBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/entity.Application" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/schema.ResponseBody" } } } }, "post": { "security": [ { "ApiKeyAuth": [] } ], "description": "创建一个应用程序", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "applications" ], "summary": "创建并保存一个应用程序", "parameters": [ { "description": "创建应用程序的请求", "name": "ApplicationCreateRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/schema.ApplicationCreateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/schema.ResponseBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/entity.Application" } } } } ] } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/schema.ResponseBody" } } } } } }, "definitions": { "entity.Application": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "type": "string" }, "user_id": { "type": "string" } } }, "entity.ApplicationToken": { "type": "object", "properties": { "application": { "$ref": "#/definitions/entity.Application" }, "application_id": { "type": "integer" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "token": { "type": "string" }, "updated_at": { "type": "string" } } }, "schema.ApplicationCreateRequest": { "type": "object", "properties": { "name": { "type": "string" } } }, "schema.ResponseBody": { "type": "object", "properties": { "data": {}, "error": { "type": "string" }, "message": { "type": "string" }, "success": { "type": "boolean" } } } }, "securityDefinitions": { "ApiKeyAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "", BasePath: "", Schemes: []string{}, Title: "Recommender API", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }