JourneyResource.java (moskito-moskito-2.9.3) | : | JourneyResource.java (moskito-moskito-2.10.0) | ||
---|---|---|---|---|
package net.anotheria.moskito.webui.journey.resource; | package net.anotheria.moskito.webui.journey.resource; | |||
import io.swagger.v3.oas.annotations.servers.Server; | ||||
import net.anotheria.anoplass.api.APIException; | import net.anotheria.anoplass.api.APIException; | |||
import net.anotheria.moskito.webui.shared.resource.AbstractResource; | import net.anotheria.moskito.webui.shared.resource.AbstractResource; | |||
import net.anotheria.moskito.webui.shared.resource.ReplyObject; | import net.anotheria.moskito.webui.shared.resource.ReplyObject; | |||
import javax.ws.rs.GET; | import javax.ws.rs.GET; | |||
import javax.ws.rs.Path; | import javax.ws.rs.Path; | |||
import javax.ws.rs.WebApplicationException; | import javax.ws.rs.WebApplicationException; | |||
/** | /** | |||
* REST Resource for journey endpoint. | * REST Resource for journey endpoint. | |||
* | * | |||
* @author lrosenberg | * @author lrosenberg | |||
* @since 14.02.13 10:38 | * @since 14.02.13 10:38 | |||
*/ | */ | |||
@Path("journeys") | @Path("journeys") | |||
@Server(url = "/moskito-inspect-rest/") | //@Server(url = "/moskito-inspect-rest/") | |||
public class JourneyResource extends AbstractResource { | public class JourneyResource extends AbstractResource { | |||
@GET @Path("list") | @GET @Path("list") | |||
public ReplyObject getJourneyList(){ | public ReplyObject getJourneyList(){ | |||
try{ | try{ | |||
return ReplyObject.success("journeys", getJourneyAPI().ge tJourneys()); | return ReplyObject.success("journeys", getJourneyAPI().ge tJourneys()); | |||
}catch(APIException e){ | }catch(APIException e){ | |||
throw new WebApplicationException(e); | throw new WebApplicationException(e); | |||
} | } | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added |