fix GolferApi

This commit is contained in:
2024-05-27 12:44:22 -04:00
parent 5ea6403f04
commit aa9df77208

View File

@@ -16,18 +16,13 @@ import jakarta.ws.rs.Produces;
/** /**
* @author brian.long@poststats.com * @author brian.long@poststats.com
*/ */
@Path("/golfer/{personId}") @Path("/golfer/{personId:[0-9]+}")
@Tag(name = "Golfer API") @Tag(name = "Golfer API")
public abstract class GolferApi { @ApiResponses({
@ApiResponse(responseCode = "200", description = "Success"),
@NotNull @ApiResponse(responseCode = "404", description = "A golfer with the specified ID could not be found")
@Positive })
@PathParam("personId") public interface GolferApi {
private long personId;
protected long getPersonId() {
return this.personId;
}
@GET @GET
@Produces(Constants.V1_JSON) @Produces(Constants.V1_JSON)
@@ -35,10 +30,6 @@ public abstract class GolferApi {
summary = "Retrieves limited meta-data about a golfer.", summary = "Retrieves limited meta-data about a golfer.",
description = "Retreives name, location, and other direct meta-data about the specified golfer." description = "Retreives name, location, and other direct meta-data about the specified golfer."
) )
@ApiResponses({ Golfer get(@NotNull @Positive @PathParam("personId") long personId);
@ApiResponse(responseCode = "200", description = "Success"),
@ApiResponse(responseCode = "404", description = "A golfer with the specified ID could not be found")
})
public abstract Golfer get();
} }