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:
@@ -37,7 +37,7 @@ export interface RecipeBook {
|
||||
* @type {number}
|
||||
* @memberof RecipeBook
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -80,7 +80,6 @@ export interface RecipeBook {
|
||||
* Check if a given object implements the RecipeBook interface.
|
||||
*/
|
||||
export function instanceOfRecipeBook(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('shared' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
@@ -97,7 +96,7 @@ export function RecipeBookFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'shared': ((json['shared'] as Array<any>).map(UserFromJSON)),
|
||||
@@ -113,6 +112,7 @@ export function RecipeBookToJSON(value?: RecipeBook | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'shared': ((value['shared'] as Array<any>).map(UserToJSON)),
|
||||
|
||||
Reference in New Issue
Block a user