class ComputationResource {

    @UserRequired
    @POST
    @Timed
    @Consumes(MediaType.APPLICATION_JSON)
    @UnitOfWork
    @Path("{tenant}")
    @ApiOperation(value = "Save/update computation, basically creates a new version",
            response = ComputationDomain.class)
    public Response saveOrUpdate(@PathParam("tenant") final String tenant, @Valid final ComputationDomain computation) {
        final ComputationDomain result = service.saveOrUpdate(tenant, computation);
        return Response.status(Response.Status.CREATED).entity(result).build();
    }

}