129 lines
3.5 KiB
Go
129 lines
3.5 KiB
Go
// 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": {
|
|
"name": "Brain Baking",
|
|
"url": "https://brainbaking.com"
|
|
},
|
|
"license": {
|
|
"name": "MIT",
|
|
"url": "https://opensource.org/licenses/MIT"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/pokemon": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "get all pokemon",
|
|
"operationId": "get-all-pokemon",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/pb.Pokemons"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/pokemon/{name}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"summary": "Find a specific pokemon by name",
|
|
"operationId": "get-specific-pokemon",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/pb.Pokemons"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"pb.Move": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"pb.Pokemon": {
|
|
"type": "object",
|
|
"properties": {
|
|
"height": {
|
|
"type": "integer"
|
|
},
|
|
"moves": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/pb.Move"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"weight": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"pb.Pokemons": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/pb.Pokemon"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "1.0",
|
|
Host: "localhost:8080",
|
|
BasePath: "/",
|
|
Schemes: []string{},
|
|
Title: "Pokedex",
|
|
Description: "A Pokedex Go Kata",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|