From 5e0ba7f6300d8c6e00f899e3ac670a625209a6e5 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 1 Mar 2025 15:01:28 +0100 Subject: [PATCH] Fix path params making items not appear in swagger --- api/src/controllers/entries.ts | 7 ++++--- api/src/controllers/movies.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/src/controllers/entries.ts b/api/src/controllers/entries.ts index 0b65cc7c..9dcada78 100644 --- a/api/src/controllers/entries.ts +++ b/api/src/controllers/entries.ts @@ -164,7 +164,7 @@ async function getEntries( .limit(limit); } -export const entriesH = new Elysia() +export const entriesH = new Elysia({ tags: ["series"] }) .model({ episode: Episode, movie_entry: MovieEntry, @@ -203,10 +203,10 @@ export const entriesH = new Elysia() }, { detail: { description: "Get entries of a serie" }, - path: t.Object({ + params: t.Object({ id: t.String({ description: "The id or slug of the serie.", - examples: [madeInAbyss.slug], + example: madeInAbyss.slug, }), }), query: t.Object({ @@ -309,5 +309,6 @@ export const entriesH = new Elysia() 200: Page(UnknownEntry), 422: KError, }, + tags: [], }, ); diff --git a/api/src/controllers/movies.ts b/api/src/controllers/movies.ts index 21a4f3e6..83f209ac 100644 --- a/api/src/controllers/movies.ts +++ b/api/src/controllers/movies.ts @@ -171,7 +171,7 @@ export const movies = new Elysia({ prefix: "/movies", tags: ["movies"] }) params: t.Object({ id: t.String({ description: "The id or slug of the movie to retrieve.", - examples: [bubble.slug], + example: bubble.slug, }), }), query: t.Object({