Skip to content

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

@MIA-Deltat1995

Description

@MIA-Deltat1995

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions