class ProjectResource {

    @POST
    @Path("zip/form")
    @Produces("application/zip")
    public Response createZip(@FormParam("project") final String compressedModel, @Context final Providers providers) {
        final ProjectModel model = readProjectModel(compressedModel, providers);
        final String filename = ofNullable(model.getArtifact()).orElse("zip") + ".zip";
        return Response.ok().entity((StreamingOutput) out -> {
            generator.generate(toRequest(model), out);
            out.flush();
        }).header("Content-Disposition", "inline; filename=" + filename).build();
    }

}