X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Fcontrollers%2Fr1consumer%2FConsumerController.java;h=47a4a2ecc137c79bea585f872ed9d5ffccb6e37c;hb=4cd9f067e6985a28c045dd672bd86581b8b5b1a9;hp=9de57d5bc920e8ecc655a7e496e27d4faab219eb;hpb=6ab9cd9df333ab3b5ed1ce6957dcea8f20d5c28d;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java index 9de57d5b..47a4a2ec 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/r1consumer/ConsumerController.java @@ -282,8 +282,15 @@ public class ConsumerController { @ApiResponse( responseCode = "404", description = "Information type is not found", // - content = @Content(schema = @Schema(implementation = ErrorResponse.ErrorInfo.class))) // - }) + content = @Content(schema = @Schema(implementation = ErrorResponse.ErrorInfo.class))), // + @ApiResponse( + responseCode = "400", + description = "Input validation failed", // + content = @Content(schema = @Schema(implementation = ErrorResponse.ErrorInfo.class))), // + @ApiResponse( + responseCode = "409", + description = "Cannot modify job type", // + content = @Content(schema = @Schema(implementation = ErrorResponse.ErrorInfo.class)))}) public Mono> putIndividualInfoJob( // @PathVariable("infoJobId") String jobId, // @Parameter( @@ -460,7 +467,7 @@ public class ConsumerController { if (url != null && !url.isEmpty()) { URI uri = new URI(url); if (!uri.isAbsolute()) { - throw new ServiceException("URI: " + url + " is not absolute", HttpStatus.CONFLICT); + throw new ServiceException("URI: " + url + " is not absolute", HttpStatus.BAD_REQUEST); } } } @@ -478,7 +485,7 @@ public class ConsumerController { JSONObject json = new JSONObject(objectAsString); schema.validate(json); } catch (Exception e) { - throw new ServiceException("Json validation failure " + e.toString(), HttpStatus.CONFLICT); + throw new ServiceException("Json validation failure " + e.toString(), HttpStatus.BAD_REQUEST); } } }