From 97b440f577d60c091e9bceb01fd69dc45e2f0c90 Mon Sep 17 00:00:00 2001 From: Craig Disselkoen Date: Thu, 2 May 2024 11:09:49 -0700 Subject: [PATCH] update for cedar#831 (#134) Signed-off-by: Craig Disselkoen --- .../com/cedarpolicy/model/ValidationResponse.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CedarJava/src/main/java/com/cedarpolicy/model/ValidationResponse.java b/CedarJava/src/main/java/com/cedarpolicy/model/ValidationResponse.java index 357fa488..3aa98dd3 100644 --- a/CedarJava/src/main/java/com/cedarpolicy/model/ValidationResponse.java +++ b/CedarJava/src/main/java/com/cedarpolicy/model/ValidationResponse.java @@ -50,16 +50,16 @@ public final class ValidationResponse { public static final class ValidationSuccessResponse { /** Validation errors associated with particular policies. */ - @JsonProperty("validation_errors") + @JsonProperty("validationErrors") public final ImmutableList validationErrors; /** Validation warnings associated with particular policies. */ - @JsonProperty("validation_warnings") + @JsonProperty("validationWarnings") public final ImmutableList validationWarnings; @JsonCreator public ValidationSuccessResponse( - @JsonProperty("validation_errors") Optional> validationErrors, - @JsonProperty("validation_warnings") Optional> validationWarnings) { + @JsonProperty("validationErrors") Optional> validationErrors, + @JsonProperty("validationWarnings") Optional> validationWarnings) { // note that ImmutableSet.copyOf() attempts to avoid a full copy when possible; see https://github.com/google/guava/wiki/ImmutableCollectionsExplained if (validationErrors.isPresent()) { this.validationErrors = ImmutableList.copyOf(validationErrors.get()); @@ -85,10 +85,10 @@ public ValidationSuccessResponse( @JsonCreator public ValidationResponse( @JsonProperty("type") SuccessOrFailure type, - @JsonProperty("validation_errors") Optional> validationErrors, - @JsonProperty("validation_warnings") Optional> validationWarnings, + @JsonProperty("validationErrors") Optional> validationErrors, + @JsonProperty("validationWarnings") Optional> validationWarnings, @JsonProperty("errors") Optional> errors, - @JsonProperty("warnings") @JsonAlias("other_warnings") Optional> warnings) { + @JsonProperty("warnings") @JsonAlias("otherWarnings") Optional> warnings) { this.type = type; this.errors = errors.map((list) -> ImmutableList.copyOf(list)); if (type == SuccessOrFailure.Success) {