Source:
<code>public ResponseEntity getAnnotations(@PathVariable("variantCoreString") String variantCoreString, @RequestParam(name = "species") String species, @RequestParam(name = "assembly") String assembly, @RequestParam(name = "annot-vep-version", required = false) String annotationVepVersion, @RequestParam(name = "annot-vep-cache-version", required = false) String annotationVepCacheVersion, HttpServletResponse response) throws IllegalArgumentException { try { checkParameters(variantCoreString, annotationVepVersion, annotationVepCacheVersion, species, assembly); } catch (IllegalArgumentException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST); } MultiMongoDbFactory.setDatabaseNameForCurrentThread(DBAdaptorConnector.getDBName(species + "_" + assembly)); Optional<VariantWithSamplesAndAnnotation> variantEntity; try { variantEntity = getVariantByCoordinatesAndAnnotationVersion(variantCoreString, annotationVepVersion, annotationVepCacheVersion); } catch (AnnotationMetadataNotFoundException | IllegalArgumentException ex) { return new ResponseEntity(ex.getMessage(), HttpStatus.BAD_REQUEST); } if (!variantEntity.isPresent() || variantEntity.get().getAnnotation() == null) { return new ResponseEntity(null, HttpStatus.NOT_FOUND); } Link coreVariantLink = new Link(linkTo(methodOn(VariantWSServerV2.class).getCoreInfo(variantCoreString, <START> species, assembly, response)).toUri().toString(), "CoreVariant"); <END> return new ResponseEntity(new Resource<>(variantEntity.get().getAnnotation(), coreVariantLink), HttpStatus.OK); }</code><technical_language>try case consistent other endpoint, camelCase suggestion species, assembly, response)).toUri().toString(), "coreVariant");</technical_language>

Target:
public ResponseEntity getAnnotations(@PathVariable("variantCoreString") String variantCoreString, @RequestParam(name = "species") String species, @RequestParam(name = "assembly") String assembly, @RequestParam(name = "annot-vep-version", required = false) String annotationVepVersion, @RequestParam(name = "annot-vep-cache-version", required = false) String annotationVepCacheVersion, HttpServletResponse response) throws IllegalArgumentException { try { checkParameters(variantCoreString, annotationVepVersion, annotationVepCacheVersion, species, assembly); } catch (IllegalArgumentException e) { return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST); } MultiMongoDbFactory.setDatabaseNameForCurrentThread(DBAdaptorConnector.getDBName(species + "_" + assembly)); Optional<VariantWithSamplesAndAnnotation> variantEntity; try { variantEntity = getVariantByCoordinatesAndAnnotationVersion(variantCoreString, annotationVepVersion, annotationVepCacheVersion); } catch (AnnotationMetadataNotFoundException | IllegalArgumentException ex) { return new ResponseEntity(ex.getMessage(), HttpStatus.BAD_REQUEST); } if (!variantEntity.isPresent() || variantEntity.get().getAnnotation() == null) { return new ResponseEntity(null, HttpStatus.NOT_FOUND); } Link coreVariantLink = new Link(linkTo(methodOn(VariantWSServerV2.class).getCoreInfo(variantCoreString, species, assembly, response)).toUri().toString(), "coreVariant"); return new ResponseEntity(new Resource<>(variantEntity.get().getAnnotation(), coreVariantLink), HttpStatus.OK); }