-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(client): ensure urls have trailing slashes #361
Conversation
Some API routes need to have a trailing slash on the end. If they don't, you can see errors such as 404, 405, 307, etc. Closes https://linear.app/prefect/issue/PLA-948/workspace-create-fails-with-404-when-endpoint-is-set Closes #359
Adds a script to help check which routes have trailing slashes.
…t into trailing-slashes
curl -s https://api.prefect.cloud/api/openapi.json | | ||
jq '.paths | ||
| to_entries | ||
| map({path: .key, method: (.value | to_entries[0].key), desc: (.value | to_entries[0].value.description)}) | ||
| map(select(.path | test("/$")))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great! Is there anywhere in our development guides that we should add a note/reference to this to point community contributors to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, I'll add a note in the Contributing guide 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in 38edad2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome - bonus points for the script
Some API routes need to have a trailing slash on the end. If they don't,
you can see errors such as 404, 405, 307, etc.
Closes https://linear.app/prefect/issue/PLA-948/workspace-create-fails-with-404-when-endpoint-is-set
Closes #359