Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare ApiEnum's raw values case insensitively #36

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

Archomeda
Copy link
Owner

For example, the TokenPermissions enum is PascalCase in Gw2Sharp, while the API lists the permissions in camelCase (or just lowercase). When checking if an enum is present in these flags, it will fail if the casing is incorrect.

The solution is to compare them case insensitively, since we're deserializing the enums case insensitively anyway.

@Archomeda Archomeda added Type: Bug Something isn't working Area: Web API v2 Related to the v2 web API labels Feb 24, 2020
@Archomeda Archomeda merged commit 39cc796 into master Feb 24, 2020
@Archomeda Archomeda deleted the fix/enum-case-insensitive-comparison branch February 24, 2020 18:42
Archomeda added a commit that referenced this pull request Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Web API v2 Related to the v2 web API Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant