Fix path params making items not appear in swagger

This commit is contained in:
Zoe Roux 2025-03-01 15:01:28 +01:00
parent caeef0417c
commit 5e0ba7f630
2 changed files with 5 additions and 4 deletions

View File

@ -164,7 +164,7 @@ async function getEntries(
.limit(limit); .limit(limit);
} }
export const entriesH = new Elysia() export const entriesH = new Elysia({ tags: ["series"] })
.model({ .model({
episode: Episode, episode: Episode,
movie_entry: MovieEntry, movie_entry: MovieEntry,
@ -203,10 +203,10 @@ export const entriesH = new Elysia()
}, },
{ {
detail: { description: "Get entries of a serie" }, detail: { description: "Get entries of a serie" },
path: t.Object({ params: t.Object({
id: t.String({ id: t.String({
description: "The id or slug of the serie.", description: "The id or slug of the serie.",
examples: [madeInAbyss.slug], example: madeInAbyss.slug,
}), }),
}), }),
query: t.Object({ query: t.Object({
@ -309,5 +309,6 @@ export const entriesH = new Elysia()
200: Page(UnknownEntry), 200: Page(UnknownEntry),
422: KError, 422: KError,
}, },
tags: [],
}, },
); );

View File

@ -171,7 +171,7 @@ export const movies = new Elysia({ prefix: "/movies", tags: ["movies"] })
params: t.Object({ params: t.Object({
id: t.String({ id: t.String({
description: "The id or slug of the movie to retrieve.", description: "The id or slug of the movie to retrieve.",
examples: [bubble.slug], example: bubble.slug,
}), }),
}), }),
query: t.Object({ query: t.Object({