Skip to content

Instantly share code, notes, and snippets.

@minisu
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save minisu/9931265 to your computer and use it in GitHub Desktop.

Select an option

Save minisu/9931265 to your computer and use it in GitHub Desktop.
@GET
@Path( "/{test}/assets" )
@ApiOperation(value = "Returns all assets in a test run")
@ApiResponses(value = {
@ApiResponse(code = 404, message = "No test with given ID"),
})
public String assets( @Auth User user, @PathParam( "test" ) String testId, @QueryParam( "scenario" ) String scenario )
{
TestRun testRun = testRunStorage.getTestRun( testId, user.getId() )
.orElseThrow( () -> new WebApplicationException( NOT_FOUND );
return testRun.listAssets( Optional.ofNullable( scenario ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment