pokedex-go/docs/swagger.yaml

69 lines
1.4 KiB
YAML

basePath: /
definitions:
pb.Move:
properties:
name:
type: string
url:
type: string
type: object
pb.Pokemon:
properties:
height:
type: integer
moves:
items:
$ref: '#/definitions/pb.Move'
type: array
name:
type: string
weight:
type: integer
type: object
pb.Pokemons:
properties:
entries:
items:
$ref: '#/definitions/pb.Pokemon'
type: array
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/pb.Pokemons'
summary: get all pokemon
/pokemon/{name}:
get:
operationId: get-specific-pokemon
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/pb.Pokemons'
"500":
description: error
schema:
type: string
summary: Find a specific pokemon by name
swagger: "2.0"