-
Notifications
You must be signed in to change notification settings - Fork 169
/
openapi-schema.yml
166 lines (160 loc) · 8.29 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
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: |-
In the dark, shadowy alleys of Gotham City, a fierce battle unfolded between two formidable opponents. The towering, imposing figure known as Chewbacca faced off against the agile and mysterious Wanderer. The air crackled with tension as the two clashed, their powers contrasting starkly against each other.
Chewbacca's sheer strength and ferocity were unmatched as he unleashed a flurry of powerful blows, his massive frame dominating the scene. In contrast, Wanderer's quick reflexes and cunning tactics kept him in the fight, dodging and weaving with grace and precision. The clash of styles made for a mesmerizing spectacle as the combatants danced around each other.
Despite Wanderer's best efforts, it was clear that Chewbacca's overwhelming power was too much to handle. With a mighty roar, Chewbacca delivered a final, decisive blow that sent Wanderer crashing to the ground. The hero stood victorious, his victory a testament to his incredible strength and unwavering determination.
As the dust settled and the citizens of Gotham City breathed a collective sigh of relief, Chewbacca stood tall, a beacon of hope in a city plagued by darkness. The defeated Wanderer, though vanquished, would always be remembered for his valiant effort in the face of insurmountable odds. And so, the tale of their epic clash would be etched into the annals of superhero lore, a testament to the eternal struggle between good and evil.
"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
/api/narration/image:
post:
tags:
- narration
summary: Generate an image from a narration
requestBody:
content:
text/plain:
schema:
pattern: \S
type: string
examples:
narration:
value: |-
In the dark, shadowy alleys of Gotham City, a fierce battle unfolded between two formidable opponents. The towering, imposing figure known as Chewbacca faced off against the agile and mysterious Wanderer. The air crackled with tension as the two clashed, their powers contrasting starkly against each other.
Chewbacca's sheer strength and ferocity were unmatched as he unleashed a flurry of powerful blows, his massive frame dominating the scene. In contrast, Wanderer's quick reflexes and cunning tactics kept him in the fight, dodging and weaving with grace and precision. The clash of styles made for a mesmerizing spectacle as the combatants danced around each other.
Despite Wanderer's best efforts, it was clear that Chewbacca's overwhelming power was too much to handle. With a mighty roar, Chewbacca delivered a final, decisive blow that sent Wanderer crashing to the ground. The hero stood victorious, his victory a testament to his incredible strength and unwavering determination.
As the dust settled and the citizens of Gotham City breathed a collective sigh of relief, Chewbacca stood tall, a beacon of hope in a city plagued by darkness. The defeated Wanderer, though vanquished, would always be remembered for his valiant effort in the face of insurmountable odds. And so, the tale of their epic clash would be etched into the annals of superhero lore, a testament to the eternal struggle between good and evil.
required: true
responses:
"200":
description: An image from a narration
content:
application/json:
schema:
$ref: '#/components/schemas/FightImage'
examples:
image:
value:
imageUrl: https://oaidalleapiprodscus.blob.core.windows.net/private/org-GdpIlMzhC20CU6Tcnu4Qe6B4/user-ljypWMQk95mvH7oFhiClsWLf/img-2YLTLfddXEma581WvHxlOeM3.png?st=2024-03-08T17%3A24%3A42Z&se=2024-03-08T19%3A24%3A42Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-03-08T18%3A14%3A53Z&ske=2024-03-09T18%3A14%3A53Z&sks=b&skv=2021-08-06&sig=Lq0orGMjEy4JOv/xF6guJqx8c4Q7bRrKeAUNAyW2pbw%3D
imageNarration: "In a dark, shadowy urban setting, a dramatic\
\ battle unfolds between two formidable opponents. A towering\
\ figure characterized by a brown furry texture, huge physical\
\ stature, and excessive strength battles against a sleek, agile\
\ figure known as the Wanderer. This dark alley is filled with\
\ the electric tension of an intense battle between contrasting\
\ strengths - raw power and tactical agility. The viewers are\
\ entertained by the mesmerizing interplay between power and\
\ precision, the raw strength of the furry figure continually\
\ trumps the agile maneuvers of the Wanderer. Triumph takes\
\ the form of the towering, hirsute protagonist leaving the\
\ agile opponent sprawled on the ground. Embodying hope, the\
\ furry giant stands victorious in a city shadowed by uncertainty.\
\ The tale of this epic struggle paints an engaging portrait\
\ of the age-old battle between opposing forces."
"400":
description: Invalid (or missing) narration
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'
FightImage:
description: The generated image from the narration
type: object
properties:
imageUrl:
type: string
imageNarration:
type: string
FightLocation:
description: Location of a fight
type: object
properties:
name:
type: string
description:
type: string