Skip to content

Commit 6c88c66

Browse files
committed
fix(iaas): add overrides for VPCNetworkRanges
1 parent d2eb282 commit 6c88c66

13 files changed

Lines changed: 1347 additions & 1 deletion

scripts/generators/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ How to configure an override:
7171
- `<name>` has to be equal for all 3 properties
7272
- `path` is used to match the generated file, which should be replaced
7373
- `hash` is used to check that the generated file still has the same content as when the override was configured
74-
- `replacementPaht` specifies the file in resources, that should be used as replacemen
74+
- `replacementPath` specifies the file in resources, that should be used as replacement
75+
- mark adjusted sections in the replacement file in resources with an `OVERRIDE:` comment

scripts/generators/overrides/go/v1api_model_area_id.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generators/overrides/go/v2api_model_area_id.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generators/overrides/go/v2beta_model_area_id.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generators/overrides/java/iaas_v2alpha_model_destinationCIDRv4.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
222222
if (!jsonObj.get("type").isJsonPrimitive()) {
223223
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
224224
}
225+
// OVERRIDE: this if block fixes oneOf issues
225226
if (!"cidrv4".equals(jsonObj.get("type").getAsString())) {
226227
throw new IllegalArgumentException(
227228
String.format(

scripts/generators/overrides/java/iaas_v2alpha_model_destinationCIDRv6.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
222222
if (!jsonObj.get("type").isJsonPrimitive()) {
223223
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
224224
}
225+
// OVERRIDE: this if block fixes oneOf issues
225226
if (!"cidrv6".equals(jsonObj.get("type").getAsString())) {
226227
throw new IllegalArgumentException(
227228
String.format(

scripts/generators/overrides/java/iaas_v2alpha_model_nexthopBlackhole.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
196196
if (!jsonObj.get("type").isJsonPrimitive()) {
197197
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
198198
}
199+
// OVERRIDE: this if block fixes oneOf issues
199200
if (!"blackhole".equals(jsonObj.get("type").getAsString())) {
200201
throw new IllegalArgumentException(
201202
String.format(

scripts/generators/overrides/java/iaas_v2alpha_model_nexthopIPv4.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
222222
if (!jsonObj.get("type").isJsonPrimitive()) {
223223
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
224224
}
225+
// OVERRIDE: this if block fixes oneOf issues
225226
if (!"ipv4".equals(jsonObj.get("type").getAsString())) {
226227
throw new IllegalArgumentException(
227228
String.format(

scripts/generators/overrides/java/iaas_v2alpha_model_nexthopIPv6.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
222222
if (!jsonObj.get("type").isJsonPrimitive()) {
223223
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
224224
}
225+
// OVERRIDE: this if block fixes oneOf issues
225226
if (!"ipv6".equals(jsonObj.get("type").getAsString())) {
226227
throw new IllegalArgumentException(
227228
String.format(

scripts/generators/overrides/java/iaas_v2alpha_model_nexthopInternet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
196196
if (!jsonObj.get("type").isJsonPrimitive()) {
197197
throw new IllegalArgumentException(String.format(java.util.Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString()));
198198
}
199+
// OVERRIDE: this if block fixes oneOf issues
199200
if (!"internet".equals(jsonObj.get("type").getAsString())) {
200201
throw new IllegalArgumentException(
201202
String.format(

0 commit comments

Comments
 (0)