-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
After migrating from @elysiajs/swagger
to @elysiajs/openapi
(v1.3.11), custom operationId
defined in detail
is ignored and replaced by an auto-generated one.
Minimal reproduction
import { Elysia, t } from "elysia";
import { openapi } from "@elysiajs/openapi";
new Elysia()
.use(openapi())
.get("/check", () => true, {
needsAuth: false,
detail: {
operationId: "checkSession",
summary: "Check auth session"
},
response: t.Boolean({
description: "True if session is valid",
examples: [true]
})
})
.listen(3000);
Exxpected OpenAPI JSON
"/check": {
"get": {
"operationId": "checkSession",
"summary": "Check auth session",
...
}
}
Actual Output
"/check": {
"get": {
"operationId": "getCheck",
"summary": "Check auth session",
...
}
}
Environment
- @elysiajs/openapi v1.3.11
- elysia v1.3.13
- bun v1.2.20
Metadata
Metadata
Assignees
Labels
No labels