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