public Response correct(@Context UriInfo uriInfo, @PathParam("versionId") String versionId, ConventionDocument document) {
UniqueId uniqueId = getUrlConventionId().atVersion(versionId);
if (!uniqueId.equals(document.getUniqueId())) {
throw new IllegalArgumentException("Document uniqueId does not match URI");
}
ConventionDocument result = getConventionMaster().correct(document);
URI uri = uriVersion(uriInfo.getBaseUri(), result.getUniqueId());
return responseCreatedFudge(uri, result);
}