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

The prefix with or without trailing slash is applied erroneously to the simple API / #380

Open
MIA-Deltat1995 opened this issue Aug 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MIA-Deltat1995
Copy link
Contributor

The description of the bug or the rationale of your proposal

If it is configured a custom prefix and there is a API with path '/', the resulting OAS documentation is wrong.

A snippet of code for replicating the issue or showing the proposal usage if applicable

Using the prefix /prefix/ and registering the GET / the OAS is the following (see this test

test('Test Fastify creation with custom prefix', async assert => {
):
Schermata del 2024-08-06 11-58-07

Using the prefix /prefix and registering the GET / the OAS is the following (see this test

test('Test Fastify creation with custom prefix without trailing slash', async assert => {
):
Schermata del 2024-08-06 11-58-22

Note
Consider that in these tests fastify use the default settings:

@MIA-Deltat1995 MIA-Deltat1995 added the bug Something isn't working label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant