elysiajs / elysia-swagger

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

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

Open Flaque opened 5 months ago

Flaque commented 5 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",