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