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

Try button in API docs shows 404 error caused by converted slash character in slug #1346

Closed
Archy-X opened this issue Apr 17, 2024 · 1 comment

Comments

@Archy-X
Copy link

Archy-X commented Apr 17, 2024

Observed/problematic behavior

In the API docs on the website, testing any project slug (which requires a forward slash) into endpoints that takes a {slug} parameter shows a 404 error when the "Try" button is clicked to test the endpoint. The slash character is converted to "%2F" in the curl string shown, causing the project to be not found.

Expected behavior

Typing a project slug with a slash character and clicking Try should correctly test the endpoint.

Steps to reproduce

  1. Go to the API docs for an endpoint that takes a {slug} like https://hangar.papermc.io/api-docs#get-/api/v1/projects/-slug-/latestrelease
  2. Enter a project slug into the field like ViaVersion/ViaVersion
  3. Click the "Try" button
  4. See an empy response and Response Status: 404 shown

Other

No response

@MiniDigger
Copy link
Member

slugs don't require a slash. we call "ViaVersion/ViaVersion" as namespace, where the first is the owner and the second part is the project slug. so you just want to put "ViaVersion" in there.

I guess we could be better at explaining the term slug, but its already documented for all endpoints that return a project
image

@MiniDigger MiniDigger closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2024
@github-project-automation github-project-automation bot moved this from New to ✅ Done in Hangar Roadmap May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants