specification icon indicating copy to clipboard operation
specification copied to clipboard

GetGroupBans returns null on success

Open dustuu opened this issue 2 years ago • 1 comments

Using GroupsApi.GetGroupBans will always return null, even when the request seems to succeed with no exceptions thrown or errors logged.

Example code to reproduce the issue (make sure you also log in first, using the sample code from this repo's README):

Configuration config = new()
{
    Username = "your_username_here",
    Password = "your_password_here",
    UserAgent = "your_user_agent_here"
};
GroupsApi groupsApi = new(config);
List<GroupMember> groupBans = groupsApi.GetGroupBans("your_group_id_here");

Use a group that you own or have role permission to manage bans in.

I have tested the GET groups/{groupId}/bans endpoint manually with Postman by supplying the exact same user and group info, and confirmed that it works as expected. This issue only occurs for me when using this library.

dustuu avatar Jul 22 '23 11:07 dustuu

https://github.com/vrchatapi/specification/blob/d1181faae93f49b270c169410cbd4eafb589afb5/openapi/components/paths/groups.yaml#L177-L179 See the above specification, can make a PR changing this line, should just simply be marked as nullable instead.

ariesclark avatar Jul 22 '23 11:07 ariesclark

I cannot reproduce this, when manually requesting the bans endpoint. It just returns an array. Tested url: https://vrchat.com/api/1/groups/{groupid}/bans?n=51&offset=0

The only thing that's wrong here, is that a 403 mapping is missing.

C0D3-M4513R avatar Jul 22 '24 13:07 C0D3-M4513R