pokedex-go/docs/swagger.json

100 lines
2.8 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "A Pokedex Go Kata",
"title": "Pokedex",
"contact": {
"name": "Brain Baking",
"url": "https://brainbaking.com"
},
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"version": "1.0"
},
"host": "localhost:8080",
"basePath": "/",
"paths": {
"/pokemon": {
"get": {
"produces": [
"application/json"
],
"summary": "get all Pokemon",
"operationId": "get-all-pokemon",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/pokemon.Pokemon"
}
}
}
}
},
"/pokemon/{name}": {
"get": {
"produces": [
"application/json"
],
"summary": "Find a specific Pokemon by name",
"operationId": "get-specific-pokemon",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/pokemon.Pokemon"
}
},
"500": {
"description": "error",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"pokemon.Move": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"pokemonID": {
"description": "implicit; see https://gorm.io/docs/has_many.html",
"type": "integer"
},
"url": {
"type": "string"
}
}
},
"pokemon.Pokemon": {
"type": "object",
"properties": {
"height": {
"type": "integer"
},
"id": {
"type": "integer"
},
"moves": {
"type": "array",
"items": {
"$ref": "#/definitions/pokemon.Move"
}
},
"name": {
"type": "string"
},
"weight": {
"type": "integer"
}
}
}
}
}