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

swagger : hide endpoint from swagger #412

Closed
primadi opened this issue Jan 12, 2024 · 2 comments
Closed

swagger : hide endpoint from swagger #412

primadi opened this issue Jan 12, 2024 · 2 comments

Comments

@primadi
Copy link

primadi commented Jan 12, 2024

Is it possible to hide specific endpoint from swagger doc ?

thanks.

@kravetsone
Copy link
Contributor

You can use exclude Regex)

.use(swagger({
            exclude: /^\/(auth|github)/i //regexp

}));

@SaltyAom
in @fastify/swagger we can hide the route in the schema property
It would be more convenient if we could hide: true to datails to exclude the route from swagger

.get("/", "Hello, Elysia!", {
    detail: {
        hide: true
    }
});

@kravetsone
Copy link
Contributor

@SaltyAom @primadi i guess we can close it because #763 was merged

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

No branches or pull requests

3 participants