webservice changes

This commit is contained in:
2021-01-15 16:19:05 +01:00
parent 24482da680
commit e031660df9
3 changed files with 49 additions and 25 deletions

View File

@ -1,11 +1,12 @@
swagger: '2.0'
info:
title: Hello API
title: Heroes
version: "0.1"
paths:
/greeting:
/greeting/hello:
get:
tags: [ "greeting" ]
operationId: api.say_hello
summary: Returns a greeting
parameters:
@ -21,8 +22,10 @@ paths:
message:
type: string
description: Message greeting
/hero/{id}:
/heroes/hero/{id}:
get:
tags: [ "heroes" ]
operationId: heroes.get_hero
summary: Returns hero by id
parameters:
@ -40,6 +43,7 @@ paths:
500:
description: Some server error
put:
tags: [ "heroes" ]
operationId: heroes.put_hero
summary: Update a hero
parameters:
@ -63,8 +67,9 @@ paths:
description: Hero not found
500:
description: Some server error
/hero:
/heroes/hero:
post:
tags: [ "heroes" ]
operationId: heroes.post_hero
summary: Insert a hero
parameters:
@ -82,8 +87,9 @@ paths:
description: Duplicate name
500:
description: Some server error
/heroes:
/heroes/heroes:
get:
tags: [ "heroes" ]
operationId: heroes.get_heroes
summary: Returns all heroes
responses: