chore(mobile): properly patch openapi with custom response dto (#11753)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
dynamic upgradeDto(dynamic value, String targetType) {
|
||||
switch (targetType) {
|
||||
case 'UserPreferencesResponseDto':
|
||||
if (value is Map) {
|
||||
if (value['rating'] == null) {
|
||||
value['rating'] = RatingResponse().toJson();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user