mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix swagger examples for externalId
This commit is contained in:
parent
bf16231350
commit
2aada33a6a
@ -36,7 +36,7 @@ const BaseCollection = t.Object({
|
||||
|
||||
nextRefresh: t.String({ format: "date-time" }),
|
||||
|
||||
externalId: ExternalId,
|
||||
externalId: ExternalId(),
|
||||
});
|
||||
|
||||
export const CollectionTranslation = t.Object({
|
||||
|
@ -19,7 +19,7 @@ export const BaseMovieEntry = t.Intersect(
|
||||
minimum: 1,
|
||||
description: "Absolute playback order. Can be mixed with episodes.",
|
||||
}),
|
||||
externalId: ExternalId,
|
||||
externalId: ExternalId(),
|
||||
}),
|
||||
BaseEntry(),
|
||||
],
|
||||
|
@ -255,7 +255,7 @@ export const madeInAbyss = {
|
||||
externalId: {
|
||||
themoviedatabase: {
|
||||
dataId: "16738",
|
||||
link: "https://www.themoviedb.org/company/16738/movie",
|
||||
link: "https://www.themoviedb.org/company/16738",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -36,7 +36,7 @@ const BaseMovie = t.Object({
|
||||
|
||||
nextRefresh: t.String({ format: "date-time" }),
|
||||
|
||||
externalId: ExternalId,
|
||||
externalId: ExternalId(),
|
||||
});
|
||||
|
||||
export const MovieTranslation = t.Object({
|
||||
|
@ -46,7 +46,7 @@ const BaseSerie = t.Object({
|
||||
|
||||
nextRefresh: t.String({ format: "date-time" }),
|
||||
|
||||
externalId: ExternalId,
|
||||
externalId: ExternalId(),
|
||||
});
|
||||
|
||||
export const SerieTranslation = t.Object({
|
||||
|
@ -5,7 +5,7 @@ import { DbMetadata, ExternalId, Resource, TranslationRecord } from "./utils";
|
||||
import { Image, SeedImage } from "./utils/image";
|
||||
|
||||
const BaseStudio = t.Object({
|
||||
externalId: ExternalId,
|
||||
externalId: ExternalId(),
|
||||
});
|
||||
|
||||
export const StudioTranslation = t.Object({
|
||||
|
@ -1,14 +1,13 @@
|
||||
import { t } from "elysia";
|
||||
import { comment } from "../../utils";
|
||||
|
||||
export const ExternalId = t.Record(
|
||||
export const ExternalId = () => t.Record(
|
||||
t.String(),
|
||||
t.Object({
|
||||
dataId: t.String(),
|
||||
link: t.Nullable(t.String({ format: "uri" })),
|
||||
}),
|
||||
);
|
||||
export type ExternalId = typeof ExternalId.static;
|
||||
|
||||
export const EpisodeId = t.Record(
|
||||
t.String(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user