diff --git a/src/main/java/com/tecnalia/urbanite/anonymize/rest/AnonymizerAPI.java b/src/main/java/com/tecnalia/urbanite/anonymize/rest/AnonymizerAPI.java index d987c10cf2044e08de1842f3c81ab9c9a7e479a2..641218d25f255b39647302a9aa8f948f0c0e6e1c 100644 --- a/src/main/java/com/tecnalia/urbanite/anonymize/rest/AnonymizerAPI.java +++ b/src/main/java/com/tecnalia/urbanite/anonymize/rest/AnonymizerAPI.java @@ -45,7 +45,8 @@ public class AnonymizerAPI { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Successful operation."), @ApiResponse(responseCode = "400", description = "Bad request. (User unknow)")}) - @Operation(summary = "Anonymize property that has certain value", description = "Change the value {value} of the {property} for a hash.") + @Operation(summary = "Anonymize property that has certain value", description = "Change the value {value} of the {property} for a hash..\\n\"" + + "<br/><br/><b>THIS SERVICE HAS BEEN DISABLED IN THE TEST ENVIRONMENT</b> ") public ResponseEntity<String> anonymizeUser( @Parameter(description = "City where is the data to be processed") @PathVariable City city, @Parameter(description = "Model that is going to be anonymized.", example = "vehicle") @PathVariable String model, diff --git a/src/main/java/com/tecnalia/urbanite/anonymize/service/AnonymizerService.java b/src/main/java/com/tecnalia/urbanite/anonymize/service/AnonymizerService.java index 7e14b6280706b1fea14dd2cb47ba111d8c9c72fb..c45b6fcc01b5e1c799c288899412853f810b8d8a 100644 --- a/src/main/java/com/tecnalia/urbanite/anonymize/service/AnonymizerService.java +++ b/src/main/java/com/tecnalia/urbanite/anonymize/service/AnonymizerService.java @@ -45,14 +45,14 @@ public class AnonymizerService { JSONObject object = objects.getJSONObject(i); String propertyAnonimizied = Crypto.generateHash((String) object.get(property)); object.put(property, propertyAnonimizied); - JSONObject result = dataService.updateObjects(object, model, city,object.getString("id")); + //JSONObject result = dataService.updateObjects(object, model, city,object.getString("id")); - if (result.has("Error")) { + /*if (result.has("Error")) { return new ResponseEntity<>("Error while anonymizig:" + property + ". Please try again !!\n " + result.getString("Error"), HttpStatus.INTERNAL_SERVER_ERROR); } - else { - System.out.println(result.toString()); - } + else {*/ + System.out.println("THIS SERVICE HAS BEEN DISABLED IN THE TEST ENVIRONMENT");//result.toString()); + /*}*/ } }