diff --git a/java/post-java-generation.patch b/java/post-java-generation.patch index c01f249..dc0a5e4 100644 --- a/java/post-java-generation.patch +++ b/java/post-java-generation.patch @@ -32,3 +32,13 @@ diff --git a/java/src/main/java/com/hathora/client/model/Room.java b/java/src/ma // ensure the json data is an array if (!jsonObj.get("allocations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `allocations` to be an array in the JSON string but got `%s`", jsonObj.get("allocations").toString())); +@@ -366,9 +366,6 @@ public class Room { + for (int i = 0; i < jsonArrayallocations.size(); i++) { + RoomAllocation.validateJsonObject(jsonArrayallocations.get(i).getAsJsonObject()); + }; +- if (!jsonObj.get("roomConfig").isJsonPrimitive()) { +- throw new IllegalArgumentException(String.format("Expected the field `roomConfig` to be a primitive type in the JSON string but got `%s`", jsonObj.get("roomConfig").toString())); +- } + if (!jsonObj.get("roomId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `roomId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("roomId").toString())); + } diff --git a/java/src/main/java/com/hathora/client/model/Room.java b/java/src/main/java/com/hathora/client/model/Room.java index b98d3ff..1303814 100644 --- a/java/src/main/java/com/hathora/client/model/Room.java +++ b/java/src/main/java/com/hathora/client/model/Room.java @@ -366,9 +366,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { for (int i = 0; i < jsonArrayallocations.size(); i++) { RoomAllocation.validateJsonObject(jsonArrayallocations.get(i).getAsJsonObject()); }; - if (!jsonObj.get("roomConfig").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `roomConfig` to be a primitive type in the JSON string but got `%s`", jsonObj.get("roomConfig").toString())); - } if (!jsonObj.get("roomId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `roomId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("roomId").toString())); }