File tree Expand file tree Collapse file tree
services/iaas/src/main/java/cloud/stackit/sdk/iaas Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -581,6 +581,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
581581 "Expected the field `ipVersion` to be a primitive type in the JSON string but got `%s`",
582582 jsonObj.get("ipVersion").toString()));
583583 }
584+ // OVERRIDE: this if block fixes oneOf issues
585+ if (!"ipv4".equals(jsonObj.get("ipVersion").getAsString())) {
586+ throw new IllegalArgumentException(
587+ String.format(
588+ java.util.Locale.ROOT,
589+ "Expectd the field `ipVersion` to have value `ipv4` but got `%s`",
590+ jsonObj.get("ipVersion")));
591+ }
584592 // validate the required field `ipVersion`
585593 IpVersionEnum.validateJsonElement(jsonObj.get("ipVersion"));
586594 // ensure the optional json data is an array if present
Original file line number Diff line number Diff line change @@ -245,6 +245,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
245245 "Expected the field `type` to be a primitive type in the JSON string but got `%s`",
246246 jsonObj.get("type").toString()));
247247 }
248+ // OVERRIDE: this if block fixes oneOf issues
249+ if (!"blackhole".equals(jsonObj.get("type").getAsString())) {
250+ throw new IllegalArgumentException(
251+ String.format(
252+ java.util.Locale.ROOT,
253+ "Expectd the field `type` to have value `blackhole` but got `%s`",
254+ jsonObj.get("type")));
255+ }
248256 // validate the required field `type`
249257 TypeEnum.validateJsonElement(jsonObj.get("type"));
250258 }
You can’t perform that action at this time.
0 commit comments