elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
84 stars 45 forks source link

Bug: excludeTags does not exclude a route from OpenAPI / Scalar #129

Open Flaque opened 3 months ago

Flaque commented 3 months ago

Overview

In the example below, I would expect the /hideme route to be hidden, because it has the excluded tag.

import swagger from "@elysiajs/swagger";
import Elysia from "elysia";

const app = new Elysia();

app
    .get("/hideme", "hidden", {
        tags: ["excluded"],
    })
    .get("/showme", "shown")
    .use(swagger({
        excludeTags: ["excluded"],
    }));

app.listen(3001);

However, it still appears in the Scalar documentation at /swagger.

Screenshot 2024-06-22 at 12 17 23 PM

Versions

This is on the following versions:

"@elysiajs/swagger": "^1.0.5",
"elysia": "^1.0.25",