-
Notifications
You must be signed in to change notification settings - Fork 174
/
Copy pathopenapi-schema.yml
101 lines (101 loc) · 2.78 KB
/
openapi-schema.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
openapi: 3.0.3
info:
title: Narration API
description: This API allows Narration using the Microsoft Semantic Kernel OpenAI
contact:
name: Quarkus
url: https://github.com/quarkusio
version: "1.0"
tags:
- name: hello
- name: narration
paths:
/api/narration:
post:
tags:
- narration
summary: Creates a narration for the fight
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Fight'
examples:
valid_fight:
value:
winnerName: Chewbacca
winnerLevel: 5
winnerPicture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/chewbacca--684239239428094811.jpg
winnerPowers: "Big, hairy, strong"
winnerTeam: heroes
loserName: Wanderer
loserLevel: 3
loserPicture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/wanderer-300775911119209178.jpg
loserPowers: Not strong
location:
name: Gotham City
description: "An American city rife with corruption and crime,\
\ the home of its iconic protector Batman."
required: true
responses:
"200":
description: The narration
content:
text/plain:
schema:
type: string
examples:
narration_success:
value: This is your fight narration!
"400":
description: Invalid (or missing) fight
/api/narration/hello:
get:
tags:
- hello
summary: Ping hello
responses:
"200":
description: Ping hello
content:
text/plain:
schema:
type: string
examples:
hello_success:
value: Hello Narration Resource
components:
schemas:
Fight:
description: The fight that is narrated
type: object
properties:
winnerName:
type: string
winnerLevel:
format: int32
type: integer
winnerPowers:
type: string
loserName:
type: string
loserLevel:
format: int32
type: integer
loserPowers:
type: string
winnerTeam:
type: string
loserTeam:
type: string
location:
$ref: '#/components/schemas/FightLocation'
FightLocation:
description: Location of a fight
type: object
properties:
name:
type: string
description:
type: string