mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -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" }),
|
nextRefresh: t.String({ format: "date-time" }),
|
||||||
|
|
||||||
externalId: ExternalId,
|
externalId: ExternalId(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const CollectionTranslation = t.Object({
|
export const CollectionTranslation = t.Object({
|
||||||
|
@ -19,7 +19,7 @@ export const BaseMovieEntry = t.Intersect(
|
|||||||
minimum: 1,
|
minimum: 1,
|
||||||
description: "Absolute playback order. Can be mixed with episodes.",
|
description: "Absolute playback order. Can be mixed with episodes.",
|
||||||
}),
|
}),
|
||||||
externalId: ExternalId,
|
externalId: ExternalId(),
|
||||||
}),
|
}),
|
||||||
BaseEntry(),
|
BaseEntry(),
|
||||||
],
|
],
|
||||||
|
@ -255,7 +255,7 @@ export const madeInAbyss = {
|
|||||||
externalId: {
|
externalId: {
|
||||||
themoviedatabase: {
|
themoviedatabase: {
|
||||||
dataId: "16738",
|
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" }),
|
nextRefresh: t.String({ format: "date-time" }),
|
||||||
|
|
||||||
externalId: ExternalId,
|
externalId: ExternalId(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const MovieTranslation = t.Object({
|
export const MovieTranslation = t.Object({
|
||||||
|
@ -46,7 +46,7 @@ const BaseSerie = t.Object({
|
|||||||
|
|
||||||
nextRefresh: t.String({ format: "date-time" }),
|
nextRefresh: t.String({ format: "date-time" }),
|
||||||
|
|
||||||
externalId: ExternalId,
|
externalId: ExternalId(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const SerieTranslation = t.Object({
|
export const SerieTranslation = t.Object({
|
||||||
|
@ -5,7 +5,7 @@ import { DbMetadata, ExternalId, Resource, TranslationRecord } from "./utils";
|
|||||||
import { Image, SeedImage } from "./utils/image";
|
import { Image, SeedImage } from "./utils/image";
|
||||||
|
|
||||||
const BaseStudio = t.Object({
|
const BaseStudio = t.Object({
|
||||||
externalId: ExternalId,
|
externalId: ExternalId(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const StudioTranslation = t.Object({
|
export const StudioTranslation = t.Object({
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
import { t } from "elysia";
|
import { t } from "elysia";
|
||||||
import { comment } from "../../utils";
|
import { comment } from "../../utils";
|
||||||
|
|
||||||
export const ExternalId = t.Record(
|
export const ExternalId = () => t.Record(
|
||||||
t.String(),
|
t.String(),
|
||||||
t.Object({
|
t.Object({
|
||||||
dataId: t.String(),
|
dataId: t.String(),
|
||||||
link: t.Nullable(t.String({ format: "uri" })),
|
link: t.Nullable(t.String({ format: "uri" })),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
export type ExternalId = typeof ExternalId.static;
|
|
||||||
|
|
||||||
export const EpisodeId = t.Record(
|
export const EpisodeId = t.Record(
|
||||||
t.String(),
|
t.String(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user