mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
no longer split schema in request/response
This commit is contained in:
@@ -55,7 +55,7 @@ export interface Recipe {
|
||||
* @type {number}
|
||||
* @memberof Recipe
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -200,7 +200,6 @@ export interface Recipe {
|
||||
* Check if a given object implements the Recipe interface.
|
||||
*/
|
||||
export function instanceOfRecipe(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('image' in value)) return false;
|
||||
if (!('steps' in value)) return false;
|
||||
@@ -223,7 +222,7 @@ export function RecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Re
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'image': json['image'],
|
||||
@@ -256,6 +255,7 @@ export function RecipeToJSON(value?: Recipe | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'keywords': value['keywords'] == null ? undefined : ((value['keywords'] as Array<any>).map(KeywordToJSON)),
|
||||
|
||||
Reference in New Issue
Block a user