working search with flat endpoint

This commit is contained in:
vabene1111
2024-02-29 20:08:37 +01:00
parent e47bdd043e
commit 1cac34d2a0
143 changed files with 18623 additions and 9992 deletions

View File

@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* Django Recipes
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,12 +13,12 @@
*/
import { exists, mapValues } from '../runtime';
import type { CookLogCreatedBy } from './CookLogCreatedBy';
import type { User } from './User';
import {
CookLogCreatedByFromJSON,
CookLogCreatedByFromJSONTyped,
CookLogCreatedByToJSON,
} from './CookLogCreatedBy';
UserFromJSON,
UserFromJSONTyped,
UserToJSON,
} from './User';
/**
*
@@ -31,7 +31,7 @@ export interface CookLog {
* @type {number}
* @memberof CookLog
*/
readonly id?: number;
readonly id: number;
/**
*
* @type {number}
@@ -58,10 +58,10 @@ export interface CookLog {
comment?: string | null;
/**
*
* @type {CookLogCreatedBy}
* @type {User}
* @memberof CookLog
*/
createdBy?: CookLogCreatedBy;
readonly createdBy: User;
/**
*
* @type {Date}
@@ -73,7 +73,7 @@ export interface CookLog {
* @type {Date}
* @memberof CookLog
*/
readonly updatedAt?: Date;
readonly updatedAt: Date;
}
/**
@@ -81,7 +81,10 @@ export interface CookLog {
*/
export function instanceOfCookLog(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "recipe" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "updatedAt" in value;
return isInstance;
}
@@ -96,14 +99,14 @@ export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'id': json['id'],
'recipe': json['recipe'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'rating': !exists(json, 'rating') ? undefined : json['rating'],
'comment': !exists(json, 'comment') ? undefined : json['comment'],
'createdBy': !exists(json, 'created_by') ? undefined : CookLogCreatedByFromJSON(json['created_by']),
'createdBy': UserFromJSON(json['created_by']),
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'updatedAt': (new Date(json['updated_at'])),
};
}
@@ -120,7 +123,6 @@ export function CookLogToJSON(value?: CookLog | null): any {
'servings': value.servings,
'rating': value.rating,
'comment': value.comment,
'created_by': CookLogCreatedByToJSON(value.createdBy),
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
};
}