Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AB#39601] movie and movie genre localizations can now be published #128

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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