posprocessing hook for DRF

This commit is contained in:
vabene1111
2024-03-30 11:01:37 +01:00
parent cb98b6723f
commit dfd9f7b066
156 changed files with 11621 additions and 1118 deletions

View File

@@ -31,19 +31,19 @@ export interface RecipeOverview {
* @type {number}
* @memberof RecipeOverview
*/
readonly id: number;
id?: number;
/**
*
* @type {string}
* @memberof RecipeOverview
*/
readonly name: string;
name: string;
/**
*
* @type {string}
* @memberof RecipeOverview
*/
readonly description: string | null;
description?: string;
/**
*
* @type {string}
@@ -134,9 +134,7 @@ export interface RecipeOverview {
* Check if a given object implements the RecipeOverview interface.
*/
export function instanceOfRecipeOverview(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false;
if (!('description' in value)) return false;
if (!('image' in value)) return false;
if (!('keywords' in value)) return false;
if (!('workingTime' in value)) return false;
@@ -164,9 +162,9 @@ export function RecipeOverviewFromJSONTyped(json: any, ignoreDiscriminator: bool
}
return {
'id': json['id'],
'id': json['id'] == null ? undefined : json['id'],
'name': json['name'],
'description': json['description'],
'description': json['description'] == null ? undefined : json['description'],
'image': json['image'],
'keywords': ((json['keywords'] as Array<any>).map(KeywordLabelFromJSON)),
'workingTime': json['working_time'],
@@ -190,6 +188,9 @@ export function RecipeOverviewToJSON(value?: RecipeOverview | null): any {
}
return {
'id': value['id'],
'name': value['name'],
'description': value['description'],
};
}