working search with flat endpoint

This commit is contained in:
vabene1111
2024-02-29 20:08:37 +01:00
committed by smilerz
parent 4a8ad3db1e
commit 17f875863c
143 changed files with 18624 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,21 +13,21 @@
*/
import { exists, mapValues } from '../runtime';
import type { IngredientFood } from './IngredientFood';
import type { Food } from './Food';
import {
IngredientFoodFromJSON,
IngredientFoodFromJSONTyped,
IngredientFoodToJSON,
} from './IngredientFood';
import type { UnitConversionBaseUnit } from './UnitConversionBaseUnit';
FoodFromJSON,
FoodFromJSONTyped,
FoodToJSON,
} from './Food';
import type { Unit } from './Unit';
import {
UnitConversionBaseUnitFromJSON,
UnitConversionBaseUnitFromJSONTyped,
UnitConversionBaseUnitToJSON,
} from './UnitConversionBaseUnit';
UnitFromJSON,
UnitFromJSONTyped,
UnitToJSON,
} from './Unit';
/**
*
* Adds nested create feature
* @export
* @interface UnitConversion
*/
@@ -37,13 +37,13 @@ export interface UnitConversion {
* @type {number}
* @memberof UnitConversion
*/
readonly id?: number;
readonly id: number;
/**
*
* @type {string}
* @memberof UnitConversion
*/
readonly name?: string;
readonly name: string;
/**
*
* @type {string}
@@ -52,10 +52,10 @@ export interface UnitConversion {
baseAmount: string;
/**
*
* @type {UnitConversionBaseUnit}
* @type {Unit}
* @memberof UnitConversion
*/
baseUnit: UnitConversionBaseUnit;
baseUnit: Unit;
/**
*
* @type {string}
@@ -64,16 +64,16 @@ export interface UnitConversion {
convertedAmount: string;
/**
*
* @type {UnitConversionBaseUnit}
* @type {Unit}
* @memberof UnitConversion
*/
convertedUnit: UnitConversionBaseUnit;
convertedUnit: Unit;
/**
*
* @type {IngredientFood}
* @type {Food}
* @memberof UnitConversion
*/
food?: IngredientFood | null;
food?: Food | null;
/**
*
* @type {string}
@@ -87,6 +87,8 @@ export interface UnitConversion {
*/
export function instanceOfUnitConversion(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "baseAmount" in value;
isInstance = isInstance && "baseUnit" in value;
isInstance = isInstance && "convertedAmount" in value;
@@ -105,13 +107,13 @@ export function UnitConversionFromJSONTyped(json: any, ignoreDiscriminator: bool
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'name': !exists(json, 'name') ? undefined : json['name'],
'id': json['id'],
'name': json['name'],
'baseAmount': json['base_amount'],
'baseUnit': UnitConversionBaseUnitFromJSON(json['base_unit']),
'baseUnit': UnitFromJSON(json['base_unit']),
'convertedAmount': json['converted_amount'],
'convertedUnit': UnitConversionBaseUnitFromJSON(json['converted_unit']),
'food': !exists(json, 'food') ? undefined : IngredientFoodFromJSON(json['food']),
'convertedUnit': UnitFromJSON(json['converted_unit']),
'food': !exists(json, 'food') ? undefined : FoodFromJSON(json['food']),
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
};
}
@@ -126,10 +128,10 @@ export function UnitConversionToJSON(value?: UnitConversion | null): any {
return {
'base_amount': value.baseAmount,
'base_unit': UnitConversionBaseUnitToJSON(value.baseUnit),
'base_unit': UnitToJSON(value.baseUnit),
'converted_amount': value.convertedAmount,
'converted_unit': UnitConversionBaseUnitToJSON(value.convertedUnit),
'food': IngredientFoodToJSON(value.food),
'converted_unit': UnitToJSON(value.convertedUnit),
'food': FoodToJSON(value.food),
'open_data_slug': value.openDataSlug,
};
}