Skip to content

Commit

Permalink
[AB#39601] movie and movie genre localizations can now be published (#…
Browse files Browse the repository at this point in the history
…128)

* feature: movie and movie genre localizations can now be published
[AB#39601]

* chore: make media service to always publish localizations array
[AB#39601]

* chore: PR review adjustments
[AB#39601]
  • Loading branch information
AxTrusov committed Oct 9, 2023
1 parent 152189a commit c12645f
Show file tree
Hide file tree
Showing 64 changed files with 6,024 additions and 469 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,43 @@
"items": {
"description": "An individual movie genre object.",
"type": "object",
"title": "genre",
"title": "movie_genre",
"required": ["content_id", "order_no", "localizations"],
"additionalProperties": false,
"properties": {
"content_id": {
"$ref": "./common.json#/definitions/movie_genre_id"
},
"title": {
"description": "Title of the genre.",
"$ref": "../common.json#/definitions/non_empty_string"
},
"order_no": {
"description": "Global ordering number for the genre.",
"type": "integer"
},
"localizations": {
"description": "Localizations for every defined locale.",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"additionalProperties": false,
"title": "movie_genre_localization",
"required": ["is_default_locale", "language_tag", "title"],
"properties": {
"is_default_locale": {
"type": "boolean",
"description": "Boolean flag to indicate if locale is default or not."
},
"language_tag": {
"type": "string",
"description": "The locale for which the values are localized."
},
"title": {
"type": "string",
"description": "The localized title of this movie genre."
}
}
}
}
},
"required": ["content_id", "title", "order_no"],
"additionalProperties": false
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,10 @@
"content_id": {
"$ref": "./common.json#/definitions/movie_id"
},
"title": {
"description": "Title of the movie.",
"$ref": "../common.json#/definitions/non_empty_string"
},
"original_title": {
"description": "Original title of the movie.",
"type": "string"
},
"synopsis": {
"description": "Short description of the main plot elements.",
"$ref": "../common.json#/definitions/non_empty_string"
},
"description": {
"description": "Extended synopsis.",
"type": "string"
},
"studio": {
"description": "Name of the producing studio.",
"type": "string"
Expand Down Expand Up @@ -61,15 +49,48 @@
},
"videos": {
"$ref": "./common.json#/definitions/videos"
},
"localizations": {
"description": "Localizations for every defined locale.",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"additionalProperties": false,
"title": "movie_localization",
"required": ["is_default_locale", "language_tag", "title"],
"properties": {
"is_default_locale": {
"type": "boolean",
"description": "Boolean flag to indicate if locale is default or not."
},
"language_tag": {
"type": "string",
"description": "The locale for which the values are localized."
},
"title": {
"type": "string",
"description": "The localized title of this movie."
},
"description": {
"type": ["string", "null"],
"description": "The localized description of this movie."
},
"synopsis": {
"type": ["string", "null"],
"description": "The localized synopsis of this movie."
}
}
}
}
},
"required": [
"content_id",
"title",
"licenses",
"genre_ids",
"images",
"videos"
"videos",
"localizations"
],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,53 @@
"items": {
"description": "An individual movie genre object.",
"type": "object",
"title": "genre",
"title": "movie_genre",
"required": [
"content_id",
"order_no",
"localizations"
],
"additionalProperties": false,
"properties": {
"content_id": {
"description": "Content ID of a movie genre. Must match the pattern `^(movie_genre)-([a-zA-Z0-9_-]+)$`.",
"type": "string",
"pattern": "^(movie_genre)-([a-zA-Z0-9_-]+)$"
},
"title": {
"type": "string",
"minLength": 1,
"pattern": "^$|.*\\S.*",
"description": "A string with at least one character and not only whitespace characters."
},
"order_no": {
"description": "Global ordering number for the genre.",
"type": "integer"
},
"localizations": {
"description": "Localizations for every defined locale.",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"additionalProperties": false,
"title": "movie_genre_localization",
"required": [
"is_default_locale",
"language_tag",
"title"
],
"properties": {
"is_default_locale": {
"type": "boolean",
"description": "Boolean flag to indicate if locale is default or not."
},
"language_tag": {
"type": "string",
"description": "The locale for which the values are localized."
},
"title": {
"type": "string",
"description": "The localized title of this movie genre."
}
}
}
}
},
"required": [
"content_id",
"title",
"order_no"
],
"additionalProperties": false
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,10 @@
"type": "string",
"pattern": "^(movie)-([a-zA-Z0-9_-]+)$"
},
"title": {
"type": "string",
"minLength": 1,
"pattern": "^$|.*\\S.*",
"description": "A string with at least one character and not only whitespace characters."
},
"original_title": {
"description": "Original title of the movie.",
"type": "string"
},
"synopsis": {
"type": "string",
"minLength": 1,
"pattern": "^$|.*\\S.*",
"description": "A string with at least one character and not only whitespace characters."
},
"description": {
"description": "Extended synopsis.",
"type": "string"
},
"studio": {
"description": "Name of the producing studio.",
"type": "string"
Expand Down Expand Up @@ -416,15 +400,58 @@
],
"additionalProperties": false
}
},
"localizations": {
"description": "Localizations for every defined locale.",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"additionalProperties": false,
"title": "movie_localization",
"required": [
"is_default_locale",
"language_tag",
"title"
],
"properties": {
"is_default_locale": {
"type": "boolean",
"description": "Boolean flag to indicate if locale is default or not."
},
"language_tag": {
"type": "string",
"description": "The locale for which the values are localized."
},
"title": {
"type": "string",
"description": "The localized title of this movie."
},
"description": {
"type": [
"string",
"null"
],
"description": "The localized description of this movie."
},
"synopsis": {
"type": [
"string",
"null"
],
"description": "The localized synopsis of this movie."
}
}
}
}
},
"required": [
"content_id",
"title",
"licenses",
"genre_ids",
"images",
"videos"
"videos",
"localizations"
],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Genre } from '../types/genre';
import { MovieGenre } from '../types/movie-genre';
/**
* Definition of the movie genre publish format.
*/
export interface MovieGenresPublishedEvent {
/**
* List of movie genres.
*/
genres: Genre[];
genres: MovieGenre[];
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Image } from '../types/image';
import { License } from '../types/license';
import { MovieLocalization } from '../types/movie-localization';
import { Video } from '../types/video';
/**
* Definition of the movie publish format.
Expand All @@ -9,22 +10,10 @@ export interface MoviePublishedEvent {
* Content ID of a movie. Must match the pattern`^(movie)-([a-zA-Z0-9_-]+)$.`
*/
content_id: string;
/**
* A string with at least one character and not only whitespace characters.
*/
title: string;
/**
* Original title of the movie.
*/
original_title?: string;
/**
* A string with at least one character and not only whitespace characters.
*/
synopsis?: string;
/**
* Extended synopsis.
*/
description?: string;
/**
* Name of the producing studio.
*/
Expand Down Expand Up @@ -61,4 +50,8 @@ export interface MoviePublishedEvent {
* Array of video streams associated with movie or episode.
*/
videos: Video[];
/**
* Localizations for every defined locale.
*/
localizations: MovieLocalization[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ export * from './genre';
export * from './image';
export * from './image-type';
export * from './license';
export * from './movie-genre';
export * from './movie-genre-localization';
export * from './movie-localization';
export * from './related-item';
export * from './relation-type';
export * from './video';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export interface MovieGenreLocalization {
/**
* Boolean flag to indicate if locale is default or not.
*/
is_default_locale: boolean;
/**
* The locale for which the values are localized.
*/
language_tag: string;
/**
* The localized title of this movie genre.
*/
title: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { MovieGenreLocalization } from './movie-genre-localization';
/**
* An individual movie genre object.
*/
export interface MovieGenre {
/**
* Content ID of a movie genre. Must match the pattern `^(movie_genre)-([a-zA-Z0-9_-]+)$`.
*/
content_id: string;
/**
* Global ordering number for the genre.
*/
order_no: number;
/**
* Localizations for every defined locale.
*/
localizations: MovieGenreLocalization[];
}
Loading

0 comments on commit c12645f

Please sign in to comment.