Skip to content

Commit 87918f9

Browse files
authored
Fix profile image mirroring (#13748)
Fixes weird issue where generated sdk types for profile image does not include mirrors field, despite it's presence in the swagger. adding a post-generation hotfix.
1 parent daac34c commit 87918f9

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

packages/sdk/src/sdk/api/generated/default/models/CoverArt.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ export interface CoverArt {
3838
* @memberof CoverArt
3939
*/
4040
_1000x1000?: string;
41+
/**
42+
*
43+
* @type {Array<string>}
44+
* @memberof CoverArt
45+
*/
46+
mirrors?: Array<string>;
4147
}
4248

4349
/**
@@ -62,6 +68,7 @@ export function CoverArtFromJSONTyped(json: any, ignoreDiscriminator: boolean):
6268
'_150x150': !exists(json, '150x150') ? undefined : json['150x150'],
6369
'_480x480': !exists(json, '480x480') ? undefined : json['480x480'],
6470
'_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'],
71+
'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'],
6572
};
6673
}
6774

@@ -77,6 +84,7 @@ export function CoverArtToJSON(value?: CoverArt | null): any {
7784
'150x150': value._150x150,
7885
'480x480': value._480x480,
7986
'1000x1000': value._1000x1000,
87+
'mirrors': value.mirrors,
8088
};
8189
}
8290

packages/sdk/src/sdk/api/generated/default/models/DecodedUserToken.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function DecodedUserTokenFromJSONTyped(json: any, ignoreDiscriminator: bo
116116
'name': json['name'],
117117
'handle': json['handle'],
118118
'verified': json['verified'],
119-
'profilePicture': !exists(json, 'profilePicture') ? undefined : ProfilePictureFromJSON(json['profilePicture']),
119+
'profilePicture': !exists(json, 'profile_picture') ? undefined : ProfilePictureFromJSON(json['profile_picture']),
120120
'sub': json['sub'],
121121
'iat': json['iat'],
122122
};
@@ -137,7 +137,7 @@ export function DecodedUserTokenToJSON(value?: DecodedUserToken | null): any {
137137
'name': value.name,
138138
'handle': value.handle,
139139
'verified': value.verified,
140-
'profilePicture': ProfilePictureToJSON(value.profilePicture),
140+
'profile_picture': ProfilePictureToJSON(value.profilePicture),
141141
'sub': value.sub,
142142
'iat': value.iat,
143143
};

packages/sdk/src/sdk/api/generated/default/models/ProfilePicture.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ export interface ProfilePicture {
3838
* @memberof ProfilePicture
3939
*/
4040
_1000x1000?: string;
41+
/**
42+
*
43+
* @type {Array<string>}
44+
* @memberof ProfilePicture
45+
*/
46+
mirrors?: Array<string>;
4147
}
4248

4349
/**
@@ -62,6 +68,7 @@ export function ProfilePictureFromJSONTyped(json: any, ignoreDiscriminator: bool
6268
'_150x150': !exists(json, '150x150') ? undefined : json['150x150'],
6369
'_480x480': !exists(json, '480x480') ? undefined : json['480x480'],
6470
'_1000x1000': !exists(json, '1000x1000') ? undefined : json['1000x1000'],
71+
'mirrors': !exists(json, 'mirrors') ? undefined : json['mirrors'],
6572
};
6673
}
6774

@@ -77,6 +84,7 @@ export function ProfilePictureToJSON(value?: ProfilePicture | null): any {
7784
'150x150': value._150x150,
7885
'480x480': value._480x480,
7986
'1000x1000': value._1000x1000,
87+
'mirrors': value.mirrors,
8088
};
8189
}
8290

0 commit comments

Comments
 (0)