mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Cleanup swagger examples
This commit is contained in:
parent
43ae26679a
commit
3a7a12bfd3
@ -89,34 +89,44 @@ 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,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
headers: t.Object({
|
headers: t.Object({
|
||||||
"accept-language": t.String({
|
"accept-language": t.String({
|
||||||
default: "*",
|
default: "*",
|
||||||
examples: "en-us, ja;q=0.5",
|
example: "en-us, ja;q=0.5",
|
||||||
description: comment`
|
description: comment`
|
||||||
List of languages you want the data in.
|
List of languages you want the data in.
|
||||||
This follows the Accept-Language offical specification
|
This follows the Accept-Language offical specification
|
||||||
(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language)
|
(https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).
|
||||||
`,
|
`,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: "movie",
|
200: { ...Movie, description: "Found" },
|
||||||
404: {
|
404: {
|
||||||
...KError,
|
...KError,
|
||||||
description: "No movie found with the given id or slug.",
|
description: "No movie found with the given id or slug.",
|
||||||
|
examples: [
|
||||||
|
{ status: 404, message: "Movie not found", details: undefined },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
422: {
|
422: {
|
||||||
...KError,
|
...KError,
|
||||||
description: comment`
|
description: comment`
|
||||||
The Accept-Language header can't be satisfied (all languages listed are
|
The Accept-Language header can't be satisfied (all languages listed are
|
||||||
unavailable). Try with another languages or add * to the list of languages
|
unavailable). Try with another languages or add * to the list of languages
|
||||||
to fallback to any language.
|
to fallback to any language.
|
||||||
`,
|
`,
|
||||||
|
examples: [
|
||||||
|
{
|
||||||
|
status: 422,
|
||||||
|
message: "Accept-Language header could not be satisfied.",
|
||||||
|
details: undefined,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user