@@ -159,10 +159,10 @@ export class ObjectSerializer {
159
159
*
160
160
* @param data - The value to serialize.
161
161
* @param type - The expected type name as a string.
162
- * @param format - Format hint (e.g. "date" or "date-time").
162
+ * @param format - Format hint (e.g. "date" or "date-time"). Default is an empty string.
163
163
* @returns A JSON-compatible representation of `data`.
164
164
*/
165
- public static serialize(data: any, type: string, format: string): any {
165
+ public static serialize(data: any, type: string, format: string = "" ): any {
166
166
if (data == undefined) {
167
167
return data;
168
168
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
@@ -239,10 +239,10 @@ export class ObjectSerializer {
239
239
*
240
240
* @param data - The raw input to deserialize.
241
241
* @param type - The expected type name as a string.
242
- * @param format - Format hint (e.g. "date" or "date-time").
242
+ * @param format - Format hint (e.g. "date" or "date-time"). Default is an empty string.
243
243
* @returns A deserialized instance or value of `data`.
244
244
*/
245
- public static deserialize(data: any, type: string, format: string): any {
245
+ public static deserialize(data: any, type: string, format: string = "" ): any {
246
246
// polymorphism may change the actual type.
247
247
type = ObjectSerializer.findCorrectType(data, type);
248
248
if (data == undefined) {
0 commit comments