Skip to content

Commit

Permalink
Adding real picture links
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Deandrea <[email protected]>
  • Loading branch information
edeandrea committed Oct 27, 2023
1 parent 2c75860 commit ad31330
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
16 changes: 8 additions & 8 deletions rest-heroes/openapi-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ paths:
- id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
put:
tags:
Expand All @@ -57,7 +57,7 @@ paths:
- id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
required: true
responses:
Expand Down Expand Up @@ -85,7 +85,7 @@ paths:
value:
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
required: true
responses:
Expand Down Expand Up @@ -139,7 +139,7 @@ paths:
id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
"404":
description: No hero found
Expand Down Expand Up @@ -168,7 +168,7 @@ paths:
id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
"404":
description: The hero is not found for a given identifier
Expand All @@ -195,7 +195,7 @@ paths:
id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
required: true
responses:
Expand Down Expand Up @@ -241,7 +241,7 @@ paths:
id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
required: true
responses:
Expand All @@ -257,7 +257,7 @@ paths:
id: 1
name: Luke Skywalker
level: 10
picture: luke_skywalker.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg
powers: "Uses light sabre, The force"
"400":
description: Null hero passed in (or no request body found)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public HeroResource(Logger logger, HeroService heroService) {
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Hero.class, required = true),
examples = @ExampleObject(name = "hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}")
examples = @ExampleObject(name = "hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}")
)
)
@APIResponse(
Expand All @@ -95,7 +95,7 @@ public Uni<Response> getRandomHero() {
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Hero.class, type = SchemaType.ARRAY),
examples = @ExampleObject(name = "heroes", value = "[{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}]")
examples = @ExampleObject(name = "heroes", value = "[{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}]")
)
)
public Uni<List<Hero>> getAllHeroes(@Parameter(name = "name_filter", description = "An optional filter parameter to filter results by name") @QueryParam("name_filter") Optional<String> nameFilter) {
Expand All @@ -113,7 +113,7 @@ public Uni<List<Hero>> getAllHeroes(@Parameter(name = "name_filter", description
description = "Gets a hero for a given id",
content = @Content(
mediaType = APPLICATION_JSON, schema = @Schema(implementation = Hero.class),
examples = @ExampleObject(name = "hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}")
examples = @ExampleObject(name = "hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}")
)
)
@APIResponse(
Expand Down Expand Up @@ -151,7 +151,7 @@ public Uni<Response> createHero(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Hero.class),
examples = @ExampleObject(name = "valid_hero", value = "{\"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}")
examples = @ExampleObject(name = "valid_hero", value = "{\"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}")
)
)
@Valid @NotNull Hero hero, @
Expand Down Expand Up @@ -188,7 +188,7 @@ public Uni<Response> fullyUpdateHero(@
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Hero.class),
examples = @ExampleObject(name = "valid_hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}")
examples = @ExampleObject(name = "valid_hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}")
)
)
@Valid @NotNull Hero hero) {
Expand Down Expand Up @@ -226,7 +226,7 @@ public Uni<Response> replaceAllHeroes(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Hero.class, type = SchemaType.ARRAY),
examples = @ExampleObject(name = "heroes", value = "[{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}]")
examples = @ExampleObject(name = "heroes", value = "[{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}]")
)
)
@NotNull List<Hero> heroes,
Expand All @@ -249,7 +249,7 @@ public Uni<Response> replaceAllHeroes(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Hero.class),
examples = @ExampleObject(name = "hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}")
examples = @ExampleObject(name = "hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}")
)
)
@APIResponse(
Expand All @@ -267,7 +267,7 @@ public Uni<Response> partiallyUpdateHero(
required = true,
content = @Content(
schema = @Schema(implementation = Hero.class),
examples = @ExampleObject(name = "valid_hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"luke_skywalker.png\", \"powers\": \"Uses light sabre, The force\"}")
examples = @ExampleObject(name = "valid_hero", value = "{\"id\": 1, \"name\": \"Luke Skywalker\", \"level\": 10, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/luke-skywalker-2563509063968639219.jpg\", \"powers\": \"Uses light sabre, The force\"}")
)
)
@NotNull Hero hero) {
Expand Down
16 changes: 8 additions & 8 deletions rest-villains/openapi-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ paths:
- id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
put:
tags:
Expand All @@ -57,7 +57,7 @@ paths:
- id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
required: true
responses:
Expand Down Expand Up @@ -85,7 +85,7 @@ paths:
value:
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
required: true
responses:
Expand Down Expand Up @@ -139,7 +139,7 @@ paths:
id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
"404":
description: No villain found
Expand Down Expand Up @@ -168,7 +168,7 @@ paths:
id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
"404":
description: The villain is not found for a given identifier
Expand All @@ -195,7 +195,7 @@ paths:
id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
required: true
responses:
Expand Down Expand Up @@ -241,7 +241,7 @@ paths:
id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
required: true
responses:
Expand All @@ -257,7 +257,7 @@ paths:
id: 1
name: Darth Vader
level: 5
picture: darth_vader.png
picture: https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg
powers: "Uses light sabre, dark side of the force"
"400":
description: Null villain passed in (or no request body found)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class VillainResource {
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class, required = true),
examples = @ExampleObject(name = "villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}")
examples = @ExampleObject(name = "villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}")
)
)
@APIResponse(
Expand All @@ -92,7 +92,7 @@ public Response getRandomVillain() {
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class, type = SchemaType.ARRAY),
examples = @ExampleObject(name = "villains", value = "[{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}]")
examples = @ExampleObject(name = "villains", value = "[{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}]")
)
)
public List<Villain> getAllVillains(@Parameter(name = "name_filter", description = "An optional filter parameter to filter results by name") @QueryParam("name_filter") Optional<String> nameFilter) {
Expand All @@ -114,7 +114,7 @@ public List<Villain> getAllVillains(@Parameter(name = "name_filter", description
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class),
examples = @ExampleObject(name = "villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}")
examples = @ExampleObject(name = "villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}")
)
)
@APIResponse(
Expand Down Expand Up @@ -152,7 +152,7 @@ public Response createVillain(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class),
examples = @ExampleObject(name = "valid_villain", value = "{\"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}")
examples = @ExampleObject(name = "valid_villain", value = "{\"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}")
)
)
@Valid @NotNull Villain villain,
Expand Down Expand Up @@ -187,7 +187,7 @@ public Response fullyUpdateVillain(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class),
examples = @ExampleObject(name = "valid_villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}")
examples = @ExampleObject(name = "valid_villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}")
)
)
@Valid @NotNull Villain villain) {
Expand Down Expand Up @@ -225,7 +225,7 @@ public Response replaceAllVillains(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class, type = SchemaType.ARRAY),
examples = @ExampleObject(name = "villains", value = "[{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}]")
examples = @ExampleObject(name = "villains", value = "[{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}]")
)
)
@NotNull List<Villain> villains,
Expand All @@ -246,7 +246,7 @@ public Response replaceAllVillains(
content = @Content(
mediaType = APPLICATION_JSON,
schema = @Schema(implementation = Villain.class),
examples = @ExampleObject(name = "villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}")
examples = @ExampleObject(name = "villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}")
)
)
@APIResponse(
Expand All @@ -264,7 +264,7 @@ public Response partiallyUpdateVillain(
required = true,
content = @Content(
schema = @Schema(implementation = Villain.class),
examples = @ExampleObject(name = "valid_villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"darth_vader.png\", \"powers\": \"Uses light sabre, dark side of the force\"}")
examples = @ExampleObject(name = "valid_villain", value = "{\"id\": 1, \"name\": \"Darth Vader\", \"level\": 5, \"picture\": \"https://raw.githubusercontent.com/quarkusio/quarkus-super-heroes/characterdata/images/anakin-skywalker--8429855148488965479.jpg\", \"powers\": \"Uses light sabre, dark side of the force\"}")
)
)
@NotNull Villain villain) {
Expand Down

0 comments on commit ad31330

Please sign in to comment.