mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
no longer split schema in request/response
This commit is contained in:
@@ -37,7 +37,7 @@ export interface UnitConversion {
|
||||
* @type {number}
|
||||
* @memberof UnitConversion
|
||||
*/
|
||||
readonly id: number;
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@@ -86,7 +86,6 @@ export interface UnitConversion {
|
||||
* Check if a given object implements the UnitConversion interface.
|
||||
*/
|
||||
export function instanceOfUnitConversion(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('name' in value)) return false;
|
||||
if (!('baseAmount' in value)) return false;
|
||||
if (!('baseUnit' in value)) return false;
|
||||
@@ -105,7 +104,7 @@ export function UnitConversionFromJSONTyped(json: any, ignoreDiscriminator: bool
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'],
|
||||
'baseAmount': json['base_amount'],
|
||||
'baseUnit': UnitFromJSON(json['base_unit']),
|
||||
@@ -122,6 +121,7 @@ export function UnitConversionToJSON(value?: UnitConversion | null): any {
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'base_amount': value['baseAmount'],
|
||||
'base_unit': UnitToJSON(value['baseUnit']),
|
||||
'converted_amount': value['convertedAmount'],
|
||||
|
||||
Reference in New Issue
Block a user