|
16 | 16 | import org.eclipse.microprofile.metrics.MetricUnits; |
17 | 17 | import org.eclipse.microprofile.metrics.annotation.Timed; |
18 | 18 | import org.eclipse.microprofile.openapi.annotations.Operation; |
| 19 | +import org.eclipse.microprofile.openapi.annotations.media.Content; |
| 20 | +import org.eclipse.microprofile.openapi.annotations.media.Schema; |
19 | 21 | import org.eclipse.microprofile.openapi.annotations.parameters.Parameter; |
20 | 22 | import org.eclipse.microprofile.openapi.annotations.responses.APIResponse; |
21 | 23 | import org.eclipse.microprofile.openapi.annotations.tags.Tag; |
22 | 24 |
|
23 | 25 | import fr.fxjavadevblog.aid.api.videogame.VideoGame; |
24 | 26 | import fr.fxjavadevblog.aid.api.videogame.VideoGameRepository; |
| 27 | +import fr.fxjavadevblog.aid.utils.jaxrs.media.SpecificMediaType; |
25 | 28 | import fr.fxjavadevblog.aid.utils.jaxrs.pagination.Pagination; |
26 | 29 | import fr.fxjavadevblog.aid.utils.jaxrs.pagination.QueryParameterUtils; |
27 | 30 | import fr.fxjavadevblog.aid.utils.pagination.PagedResponse; |
@@ -61,7 +64,8 @@ public Genre[] getAllGenres() { |
61 | 64 | absolute = true, |
62 | 65 | description = "A measure of how long it takes to fetch all video games filtered by a given genre.", |
63 | 66 | unit = MetricUnits.MILLISECONDS) |
64 | | - @APIResponse(responseCode = "206", description = "Partial response. Paged.") |
| 67 | + @APIResponse(responseCode = "206", description = "Partial response. Paged.", content= {@Content( schema=@Schema(implementation = VideoGame.class))}) |
| 68 | + @APIResponse(responseCode = "412", description = "Invalid parameters.", content= { @Content(mediaType=SpecificMediaType.APPLICATION_PROBLEM_JSON) } ) |
65 | 69 | public Response findByGenre(@PathParam("genre") |
66 | 70 | final Genre genre, |
67 | 71 |
|
|
0 commit comments