From d5d96fd235ccac0196270703158cbdb73c938ea9 Mon Sep 17 00:00:00 2001 From: "Brian M. Long" Date: Wed, 25 Jun 2025 16:41:00 -0400 Subject: [PATCH] added season handicap computation endpoints --- .../golf/rs/api/AdministrativeApi.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/com/poststats/golf/rs/api/AdministrativeApi.java b/src/main/java/com/poststats/golf/rs/api/AdministrativeApi.java index feca240..e52ac59 100644 --- a/src/main/java/com/poststats/golf/rs/api/AdministrativeApi.java +++ b/src/main/java/com/poststats/golf/rs/api/AdministrativeApi.java @@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.security.RolesAllowed; import jakarta.validation.constraints.Min; import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Positive; import jakarta.ws.rs.PUT; import jakarta.ws.rs.Path; import jakarta.ws.rs.PathParam; @@ -23,6 +24,29 @@ import jakarta.ws.rs.Produces; @SecurityRequirement(name = "basic") public interface AdministrativeApi { + @PUT + @Path("/init/golfer/{personId}/season") + @Operation(description = "Sets up the current season handicap of the specified person for the virtual tournament.") + @ApiResponses({ + @ApiResponse(responseCode = "204", description = "Success"), + @ApiResponse(responseCode = "401", description = "Not authenticated"), + @ApiResponse(responseCode = "403", description = "Authenticated, but not permitted"), + @ApiResponse(responseCode = "404", description = "Person not found"), + }) + void setupScoringPointSeason(@Parameter(description = "A unique idenifier of a golfer") + @NotNull @Positive @PathParam("personId") long personId); + + @PUT + @Path("/init/season") + @Produces(Constants.V1_JSON) + @Operation(description = "Sets up the current season handicaps for the virtual tournament.") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "Success"), + @ApiResponse(responseCode = "401", description = "Not authenticated"), + @ApiResponse(responseCode = "403", description = "Authenticated, but not permitted"), + }) + long setupScoringPointSeason(); + @PUT @Path("/init/pointIndex/season/{season:[0-9]{4}}") @Produces(Constants.V1_JSON)