package com.redhat.pctsec.rest.v1alpha1; import com.redhat.pctsec.model.Scan; import com.redhat.pctsec.model.ScanRequest; import com.redhat.pctsec.model.ScanRequests; import com.redhat.pctsec.model.jpa.ScanRepository; import com.redhat.pctsec.model.jpa.ScanRequestsRepository; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import java.util.UUID; @ApplicationScoped @Path("/api/v1a/ScanRequests") public class ScanRequestsResource { @Inject ScanRequestsRepository sr; @GET @Path("{id}") @Produces({"application/json"}) public ScanRequests getScanRequests(String id) { ScanRequests scanRequests = sr.findById(UUID.fromString(id)); return scanRequests; } }