package marketing.heyday.hartmann.fotodocumentation.rest;

import jakarta.enterprise.context.RequestScoped;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;

/**
 * 
 * <p>Copyright: Copyright (c) 2024</p>
 * <p>Company: heyday Marketing GmbH</p>
 * @author <a href="mailto:p.verboom@heyday.marketing">Patrick Verboom</a>
 * @version 1.0
 * 
 * created: 14 Nov 2024
 */
@Path("monitoring")
@RequestScoped
public class MonitoringResource {

	@GET
	@Path("check/{text}")
	@Produces(MediaType.TEXT_PLAIN)
	@Operation(summary = "Monitoring service for testing if the server is up and running.")
	@ApiResponse(responseCode = "200", description = "ok with as body the given path param text. ")
	public Response check(@PathParam("text") String text) {
		return Response.status(Status.OK).entity(text).build();
	}
}
