This commit is contained in:
2021-01-14 12:51:40 +01:00
parent d4caaae0f2
commit 9570bef24d
15 changed files with 142 additions and 633 deletions

63
tools/ws/my_api.yaml Normal file
View File

@ -0,0 +1,63 @@
swagger: '2.0'
info:
title: Hello API
version: "0.1"
paths:
/greeting:
get:
operationId: api.say_hello
summary: Returns a greeting
parameters:
- name: name
in: query
type: string
responses:
200:
description: Successful response.
schema:
type: object
properties:
message:
type: string
description: Message greeting
/hero:
get:
operationId: heroes.get_hero
summary: Returns hero by id
parameters:
- name: id
in: query
type: integer
required: true
responses:
200:
description: Successful response.
schema:
$ref: '#/definitions/Hero'
404:
description: Hero not found
/heroes:
get:
operationId: heroes.get_heroes
summary: Returns all heroes
responses:
200:
description: Successful response.
schema:
type: array
items:
$ref: '#/definitions/Hero'
404:
description: No heroes available
definitions:
Hero:
description: Hero type
type: object
properties:
id:
type: integer
name:
type: string