GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Loading a group crashes due to roleIdsToView being null · Issue #7 · vrchatapi/vrchatapi-java Open Labels Type: BugThere is a **factual incorrectness** in the specThere is a **factual incorrectness** in the spec DescriptionI am attempting to load a group with the following code: String groupId = ""; // Fill in a group ID here GroupsApi groupsApi = new GroupsApi(); Group group = groupsApi.getGroup(groupId, false); This crashes with the following exception: Looking into this, it does appear that that field is marked as nullable in the specification: https://github.com/vrchatapi/specification/blob/main/openapi/components/schemas/GroupGallery.yaml#L21 and the raw response from the server looks like this: {
"roleIdsToView": null,
}Inspecting the generated code and setting a breakpoint leads me to this generated code snippet: // ensure the optional json data is an array if present if (jsonObj.get("roleIdsToView") != null && !jsonObj.get("roleIdsToView").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `roleIdsToView` to be an array in the JSON string but got `%s`", jsonObj.get("roleIdsToView").toString())); } Setting a breakpoint on the throw line reveals that jsonObj.get("roleIdsToView") is not set to null, but to JsonNull: causing the check for null to fail and the code to crash. I'm assuming this would affect other nullable fields as well; is there a flag or something that needs to be changed with the codegen to fix this? Activity
MetadataMetadataAssigneesLabelsType: BugThere is a **factual incorrectness** in the specThere is a **factual incorrectness** in the spec TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |