-
Notifications
You must be signed in to change notification settings - Fork 2
The prefix with or without trailing slash is applied erroneously to the simple API / #380
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
lc39/tests/documentation-routes.test.js
Line 56 in 5aa4769
| test('Test Fastify creation with custom prefix', async assert => { |
Using the prefix /prefix and registering the GET / the OAS is the following (see this test
lc39/tests/documentation-routes.test.js
Line 82 in 5aa4769
| test('Test Fastify creation with custom prefix without trailing slash', async assert => { |
Note
Consider that in these tests fastify use the default settings:
- ignoreTrailingSlash: false (https://fastify.dev/docs/latest/Reference/Server/#ignoretrailingslash)
- prefixTrailingSlash: 'both' (https://fastify.dev/docs/latest/Reference/Routes/#routes-options)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working