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

remove ending slash from routers #1

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tony-nyagah
Copy link
Owner

What does this PR do?

This PR removes trailing slashes on route definitions because it’s good hygiene to keep trailing slashes off paths, mainly because it can confuse tooling that uses the specification for generating code, mocking or other applications. Some tools will get confused, some tools won’t care.
Contributes to this issue: hotosm#219

The Rate My OpenAPI score improved after doing this:
Before: https://ratemyopenapi.com/report/a6fd4fed-ec6c-42e4-abca-34c10309f305
After: https://ratemyopenapi.com/report/39a8ec60-23d3-4113-8494-f98ed2fa74ef

Considerations

The trailing slashes have no negative effect when removed in the FastAPI code: fastapi/fastapi#9328

How to test?

  • Clone the repo.
  • Install by following the steps in docs/src/installation/docker.md or docs/src/installation/docker.md.
  • Run locally and view routes at http://localhost:8000/v1/docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant