secured/documented AdminApi

This commit is contained in:
2024-04-16 11:46:57 -04:00
parent 07fd0d82e4
commit 5da8830c74

View File

@@ -4,39 +4,49 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
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.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
/**
* @author brian.long@poststats.com
*/
@Path("/golf/admin")
@Tag(name = "Administrative API")
@RolesAllowed(Constants.ADMIN_ROLE)
@SecurityRequirement(name = "basic")
public interface AdministrativeApi {
@PUT
@Path("/init/pointIndex/season/{season}")
@Operation(
summary = "Transforms the legacy pointID to the new pointIndexID for the virtual tournament."
)
@Path("/init/pointIndex/season/{season:[0-9]{4}}")
@Produces(Constants.V1_JSON)
@Deprecated
@Operation(description = "Transforms the legacy pointID to the new pointIndexID for the virtual tournament.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "Success"),
@ApiResponse(responseCode = "401", description = "Not authenticated"),
@ApiResponse(responseCode = "403", description = "Authenticated, but not permitted"),
@ApiResponse(responseCode = "404", description = "Season not found"),
})
void transformScoringPointSeason(@Parameter(description = "A year")
@NotNull @Min(2000) @PathParam("season") int season);
long transformScoringPointSeason(
@Parameter(description = "A year") @NotNull @Min(2000) @PathParam("season") int season);
@PUT
@Path("/init/pointIndex/season")
@Operation(
summary = "Transforms the legacy pointID to the new pointIndexID for the virtual tournament."
)
@Produces(Constants.V1_JSON)
@Deprecated
@Operation(description = "Transforms the legacy pointID to the new pointIndexID for the virtual tournament.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "Success"),
@ApiResponse(responseCode = "401", description = "Not authenticated"),
@ApiResponse(responseCode = "403", description = "Authenticated, but not permitted"),
})
void transformScoringPointSeason();
long transformScoringPointSeason();
}