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

Case sensitivity is not consistent throughout API #1331

Closed
dxbednarczyk opened this issue Mar 6, 2024 · 2 comments
Closed

Case sensitivity is not consistent throughout API #1331

dxbednarczyk opened this issue Mar 6, 2024 · 2 comments
Labels
1. api This issue/pr relates to an issue/change on the api 1. bug Something isn't working

Comments

@dxbednarczyk
Copy link

Observed/problematic behavior

Requesting info about plugins, for example to get the latest release of Chunky, hitting
/api/v1/projects/chunky/latestrelease
returns an OK result if the slug of the project is all lowercase.

However, /api/v1/projects/chunky/versions/1.3.92/PAPER/download returns a 404.
This endpoint requires the slug for the project to be properly capitalized, in this case as Chunky.

Expected behavior

The endpoints should have the same case sensitivity, or specify what they require

Steps to reproduce

Different endpoints have different capitalization requirements. I found that messing around with the request builders on the API docs were a good tool to see which endpoints were case-sensitive or not.

The two URLs I used that raised this issue:
https://hangar.papermc.io/api/v1/projects/chunky/latestrelease
https://hangar.papermc.io/api/v1/projects/chunky/versions/1.3.92/PAPER/download

Other

No response

@kennytv kennytv added 1. bug Something isn't working 1. api This issue/pr relates to an issue/change on the api labels Apr 13, 2024
@MiniDigger
Copy link
Member

latest release seems to work fine for me, i.e https://hangar.papermc.io/api/v1/projects/chUnky/latestrelease returns fine, the download ill have to take a look at. they just redirect to our cdn (which cant handle casing), they most likely just pass the user data and not the db data.

@github-project-automation github-project-automation bot moved this from New to ✅ Done in Hangar Roadmap May 5, 2024
@MiniDigger
Copy link
Member

thanks, if you find any other, please lemme know and ill try to get to these faster...

MiniDigger added a commit that referenced this issue May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. api This issue/pr relates to an issue/change on the api 1. bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants