-
-
Couldn't load subscription status.
- Fork 370
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
Latest version: 1.2.25 published 3 weeks ago
What platform is your computer?
ubuntu 24
What steps can reproduce the bug?
import { t } from "elysia";
export const todoSchema = t.Object({
id: t.String(),
createdAt: t.Date(),
updatedAt: t.Date(),
createdById: t.String(),
// data
title: t.String(),
description: t.Optional(t.String()),
assignedAt: t.Optional(t.Date()),
completedAt: t.Optional(t.Date()),
// relations
SubtaskIds: t.Array(t.String()),
ParentTaskIds: t.Array(t.String()),
});
export const todoRouter = new Elysia({ prefix: "/todos", tags: ["todos"] })
.model({
todo: todoSchema,
})
.get(
"",
(ctx) => {
return [
{
id: "1",
createdAt: new Date(),
updatedAt: new Date(),
createdById: "1",
title: "Todo 1",
description: "Description 1",
assignedAt: new Date(),
completedAt: new Date(),
SubtaskIds: ["1", "2", "3"],
ParentTaskIds: ["1", "2", "3"],
},
];
},
{
response: "todo[]",
query: t.Object({
userId: t.String(),
}),
}
);
add swagger plugin and check the route documentation, it's missing
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
Have you try removing the node_modules and bun.lockb and try again yet?
No response
ledihildawan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working