77 lines
2.0 KiB
JSON
77 lines
2.0 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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |