Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
}

export function {{classname}}ToJSON(value?: {{classname}} | null): any {
return value as any;
return {{classname}}ToJSONTyped(value, false);
}

export function {{classname}}ToJSONTyped(value: any, ignoreDiscriminator: boolean): {{classname}} {
return value as {{classname}};
export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean = false): any {
return value as any;
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
{{/hasVars}}
}

export function {{classname}}ToJSON(json: any): {{classname}} {
return {{classname}}ToJSONTyped(json, false);
export function {{classname}}ToJSON(value?: {{classname}} | null): any {
return {{classname}}ToJSONTyped(value, false);
}

export function {{classname}}ToJSONTyped(value?: {{#hasReadOnly}}Omit<{{classname}}, {{#readOnlyVars}}'{{name}}'{{^-last}}|{{/-last}}{{/readOnlyVars}}>{{/hasReadOnly}}{{^hasReadOnly}}{{classname}}{{/hasReadOnly}} | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export function {{classname}}FromJSONTyped(json: any, ignoreDiscriminator: boole
{{/discriminator}}
}

export function {{classname}}ToJSON(json: any): any {
return {{classname}}ToJSONTyped(json, false);
export function {{classname}}ToJSON(value?: {{classname}} | null): any {
return {{classname}}ToJSONTyped(value, false);
}

export function {{classname}}ToJSONTyped(value?: {{classname}} | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function StructuredTypeFromJSONTyped(json: any, ignoreDiscriminator: bool
};
}

export function StructuredTypeToJSON(json: any): StructuredType {
return StructuredTypeToJSONTyped(json, false);
export function StructuredTypeToJSON(value?: StructuredType | null): any {
return StructuredTypeToJSONTyped(value, false);
}

export function StructuredTypeToJSONTyped(value?: StructuredType | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export function ExtendDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}

export function ExtendDtoToJSON(json: any): ExtendDto {
return ExtendDtoToJSONTyped(json, false);
export function ExtendDtoToJSON(value?: ExtendDto | null): any {
return ExtendDtoToJSONTyped(value, false);
}

export function ExtendDtoToJSONTyped(value?: ExtendDto | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export function TestBaseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean
};
}

export function TestBaseDtoToJSON(json: any): TestBaseDto {
return TestBaseDtoToJSONTyped(json, false);
export function TestBaseDtoToJSON(value?: TestBaseDto | null): any {
return TestBaseDtoToJSONTyped(value, false);
}

export function TestBaseDtoToJSONTyped(value?: TestBaseDto | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export function TestObjectTypeFromJSONTyped(json: any, ignoreDiscriminator: bool
}

export function TestObjectTypeToJSON(value?: TestObjectType | null): any {
return value as any;
return TestObjectTypeToJSONTyped(value, false);
}

export function TestObjectTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): TestObjectType {
return value as TestObjectType;
export function TestObjectTypeToJSONTyped(value?: TestObjectType | null, ignoreDiscriminator: boolean = false): any {
return value as any;
}

Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export function AbstractUserDtoFromJSONTyped(json: any, ignoreDiscriminator: boo
};
}

export function AbstractUserDtoToJSON(json: any): AbstractUserDto {
return AbstractUserDtoToJSONTyped(json, false);
export function AbstractUserDtoToJSON(value?: AbstractUserDto | null): any {
return AbstractUserDtoToJSONTyped(value, false);
}

export function AbstractUserDtoToJSONTyped(value?: AbstractUserDto | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function BranchDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}

export function BranchDtoToJSON(json: any): BranchDto {
return BranchDtoToJSONTyped(json, false);
export function BranchDtoToJSON(value?: BranchDto | null): any {
return BranchDtoToJSONTyped(value, false);
}

export function BranchDtoToJSONTyped(value?: BranchDto | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function InternalAuthenticatedUserDtoFromJSONTyped(json: any, ignoreDiscr
return json;
}

export function InternalAuthenticatedUserDtoToJSON(json: any): InternalAuthenticatedUserDto {
return InternalAuthenticatedUserDtoToJSONTyped(json, false);
export function InternalAuthenticatedUserDtoToJSON(value?: InternalAuthenticatedUserDto | null): any {
return InternalAuthenticatedUserDtoToJSONTyped(value, false);
}

export function InternalAuthenticatedUserDtoToJSONTyped(value?: InternalAuthenticatedUserDto | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function RemoteAuthenticatedUserDtoFromJSONTyped(json: any, ignoreDiscrim
return json;
}

export function RemoteAuthenticatedUserDtoToJSON(json: any): RemoteAuthenticatedUserDto {
return RemoteAuthenticatedUserDtoToJSONTyped(json, false);
export function RemoteAuthenticatedUserDtoToJSON(value?: RemoteAuthenticatedUserDto | null): any {
return RemoteAuthenticatedUserDtoToJSONTyped(value, false);
}

export function RemoteAuthenticatedUserDtoToJSONTyped(value?: RemoteAuthenticatedUserDto | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export function ClubFromJSONTyped(json: any, ignoreDiscriminator: boolean): Club
};
}

export function ClubToJSON(json: any): Club {
return ClubToJSONTyped(json, false);
export function ClubToJSON(value?: Club | null): any {
return ClubToJSONTyped(value, false);
}

export function ClubToJSONTyped(value?: Club | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function OwnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Own
};
}

export function OwnerToJSON(json: any): Owner {
return OwnerToJSONTyped(json, false);
export function OwnerToJSON(value?: Owner | null): any {
return OwnerToJSONTyped(value, false);
}

export function OwnerToJSONTyped(value?: Owner | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export function ClubFromJSONTyped(json: any, ignoreDiscriminator: boolean): Club
};
}

export function ClubToJSON(json: any): Club {
return ClubToJSONTyped(json, false);
export function ClubToJSON(value?: Club | null): any {
return ClubToJSONTyped(value, false);
}

export function ClubToJSONTyped(value?: Omit<Club, 'owner'> | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function OwnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): Own
};
}

export function OwnerToJSON(json: any): Owner {
return OwnerToJSONTyped(json, false);
export function OwnerToJSON(value?: Owner | null): any {
return OwnerToJSONTyped(value, false);
}

export function OwnerToJSONTyped(value?: Owner | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function AdditionalPropertiesClassFromJSONTyped(json: any, ignoreDiscrimi
};
}

export function AdditionalPropertiesClassToJSON(json: any): AdditionalPropertiesClass {
return AdditionalPropertiesClassToJSONTyped(json, false);
export function AdditionalPropertiesClassToJSON(value?: AdditionalPropertiesClass | null): any {
return AdditionalPropertiesClassToJSONTyped(value, false);
}

export function AdditionalPropertiesClassToJSONTyped(value?: AdditionalPropertiesClass | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export function AllOfWithSingleRefFromJSONTyped(json: any, ignoreDiscriminator:
};
}

export function AllOfWithSingleRefToJSON(json: any): AllOfWithSingleRef {
return AllOfWithSingleRefToJSONTyped(json, false);
export function AllOfWithSingleRefToJSON(value?: AllOfWithSingleRef | null): any {
return AllOfWithSingleRefToJSONTyped(value, false);
}

export function AllOfWithSingleRefToJSONTyped(value?: AllOfWithSingleRef | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export function AnimalFromJSONTyped(json: any, ignoreDiscriminator: boolean): An
};
}

export function AnimalToJSON(json: any): Animal {
return AnimalToJSONTyped(json, false);
export function AnimalToJSON(value?: Animal | null): any {
return AnimalToJSONTyped(value, false);
}

export function AnimalToJSONTyped(value?: Animal | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function ArrayOfArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscrimin
};
}

export function ArrayOfArrayOfNumberOnlyToJSON(json: any): ArrayOfArrayOfNumberOnly {
return ArrayOfArrayOfNumberOnlyToJSONTyped(json, false);
export function ArrayOfArrayOfNumberOnlyToJSON(value?: ArrayOfArrayOfNumberOnly | null): any {
return ArrayOfArrayOfNumberOnlyToJSONTyped(value, false);
}

export function ArrayOfArrayOfNumberOnlyToJSONTyped(value?: ArrayOfArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function ArrayOfNumberOnlyFromJSONTyped(json: any, ignoreDiscriminator: b
};
}

export function ArrayOfNumberOnlyToJSON(json: any): ArrayOfNumberOnly {
return ArrayOfNumberOnlyToJSONTyped(json, false);
export function ArrayOfNumberOnlyToJSON(value?: ArrayOfNumberOnly | null): any {
return ArrayOfNumberOnlyToJSONTyped(value, false);
}

export function ArrayOfNumberOnlyToJSONTyped(value?: ArrayOfNumberOnly | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export function ArrayTestFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}

export function ArrayTestToJSON(json: any): ArrayTest {
return ArrayTestToJSONTyped(json, false);
export function ArrayTestToJSON(value?: ArrayTest | null): any {
return ArrayTestToJSONTyped(value, false);
}

export function ArrayTestToJSONTyped(value?: ArrayTest | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export function CapitalizationFromJSONTyped(json: any, ignoreDiscriminator: bool
};
}

export function CapitalizationToJSON(json: any): Capitalization {
return CapitalizationToJSONTyped(json, false);
export function CapitalizationToJSON(value?: Capitalization | null): any {
return CapitalizationToJSONTyped(value, false);
}

export function CapitalizationToJSONTyped(value?: Capitalization | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export function CatFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cat {
};
}

export function CatToJSON(json: any): Cat {
return CatToJSONTyped(json, false);
export function CatToJSON(value?: Cat | null): any {
return CatToJSONTyped(value, false);
}

export function CatToJSONTyped(value?: Cat | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}

export function CategoryToJSON(json: any): Category {
return CategoryToJSONTyped(json, false);
export function CategoryToJSON(value?: Category | null): any {
return CategoryToJSONTyped(value, false);
}

export function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export function ChildWithNullableFromJSONTyped(json: any, ignoreDiscriminator: b
};
}

export function ChildWithNullableToJSON(json: any): ChildWithNullable {
return ChildWithNullableToJSONTyped(json, false);
export function ChildWithNullableToJSON(value?: ChildWithNullable | null): any {
return ChildWithNullableToJSONTyped(value, false);
}

export function ChildWithNullableToJSONTyped(value?: ChildWithNullable | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function ClassModelFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}

export function ClassModelToJSON(json: any): ClassModel {
return ClassModelToJSONTyped(json, false);
export function ClassModelToJSON(value?: ClassModel | null): any {
return ClassModelToJSONTyped(value, false);
}

export function ClassModelToJSONTyped(value?: ClassModel | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function ClientFromJSONTyped(json: any, ignoreDiscriminator: boolean): Cl
};
}

export function ClientToJSON(json: any): Client {
return ClientToJSONTyped(json, false);
export function ClientToJSON(value?: Client | null): any {
return ClientToJSONTyped(value, false);
}

export function ClientToJSONTyped(value?: Client | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function DeprecatedObjectFromJSONTyped(json: any, ignoreDiscriminator: bo
};
}

export function DeprecatedObjectToJSON(json: any): DeprecatedObject {
return DeprecatedObjectToJSONTyped(json, false);
export function DeprecatedObjectToJSON(value?: DeprecatedObject | null): any {
return DeprecatedObjectToJSONTyped(value, false);
}

export function DeprecatedObjectToJSONTyped(value?: DeprecatedObject | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export function DogFromJSONTyped(json: any, ignoreDiscriminator: boolean): Dog {
};
}

export function DogToJSON(json: any): Dog {
return DogToJSONTyped(json, false);
export function DogToJSON(value?: Dog | null): any {
return DogToJSONTyped(value, false);
}

export function DogToJSONTyped(value?: Dog | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export function EnumArraysFromJSONTyped(json: any, ignoreDiscriminator: boolean)
};
}

export function EnumArraysToJSON(json: any): EnumArrays {
return EnumArraysToJSONTyped(json, false);
export function EnumArraysToJSON(value?: EnumArrays | null): any {
return EnumArraysToJSONTyped(value, false);
}

export function EnumArraysToJSONTyped(value?: EnumArrays | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export function EnumClassFromJSONTyped(json: any, ignoreDiscriminator: boolean):
}

export function EnumClassToJSON(value?: EnumClass | null): any {
return value as any;
return EnumClassToJSONTyped(value, false);
}

export function EnumClassToJSONTyped(value: any, ignoreDiscriminator: boolean): EnumClass {
return value as EnumClass;
export function EnumClassToJSONTyped(value?: EnumClass | null, ignoreDiscriminator: boolean = false): any {
return value as any;
}

Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ export function EnumTestFromJSONTyped(json: any, ignoreDiscriminator: boolean):
};
}

export function EnumTestToJSON(json: any): EnumTest {
return EnumTestToJSONTyped(json, false);
export function EnumTestToJSON(value?: EnumTest | null): any {
return EnumTestToJSONTyped(value, false);
}

export function EnumTestToJSONTyped(value?: EnumTest | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function FakeBigDecimalMap200ResponseFromJSONTyped(json: any, ignoreDiscr
};
}

export function FakeBigDecimalMap200ResponseToJSON(json: any): FakeBigDecimalMap200Response {
return FakeBigDecimalMap200ResponseToJSONTyped(json, false);
export function FakeBigDecimalMap200ResponseToJSON(value?: FakeBigDecimalMap200Response | null): any {
return FakeBigDecimalMap200ResponseToJSONTyped(value, false);
}

export function FakeBigDecimalMap200ResponseToJSONTyped(value?: FakeBigDecimalMap200Response | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export function FileSchemaTestClassFromJSONTyped(json: any, ignoreDiscriminator:
};
}

export function FileSchemaTestClassToJSON(json: any): FileSchemaTestClass {
return FileSchemaTestClassToJSONTyped(json, false);
export function FileSchemaTestClassToJSON(value?: FileSchemaTestClass | null): any {
return FileSchemaTestClassToJSONTyped(value, false);
}

export function FileSchemaTestClassToJSONTyped(value?: FileSchemaTestClass | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function FooFromJSONTyped(json: any, ignoreDiscriminator: boolean): Foo {
};
}

export function FooToJSON(json: any): Foo {
return FooToJSONTyped(json, false);
export function FooToJSON(value?: Foo | null): any {
return FooToJSONTyped(value, false);
}

export function FooToJSONTyped(value?: Foo | null, ignoreDiscriminator: boolean = false): any {
Expand Down
Loading
Loading