mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
no longer split schema in request/response
This commit is contained in:
@@ -95,7 +95,7 @@ export interface Food {
|
||||
* @type {number}
|
||||
* @memberof Food
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -241,7 +241,6 @@ export interface Food {
|
||||
* Check if a given object implements the Food interface.
|
||||
*/
|
||||
export function instanceOfFood(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('shopping' in value)) return false;
|
||||
if (!('parent' in value)) return false;
|
||||
@@ -261,7 +260,7 @@ export function FoodFromJSONTyped(json: any, ignoreDiscriminator: boolean): Food
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
@@ -294,6 +293,7 @@ export function FoodToJSON(value?: Food | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'plural_name': value['pluralName'],
|
||||
'description': value['description'],
|
||||
|
||||
Reference in New Issue
Block a user