Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 87c97dc

Browse files
committed
MINOR: Add profile_picture field in user serialization
* add user picture field * fix user.company, add comment about an edge case
1 parent 0529ece commit 87c97dc

6 files changed

Lines changed: 30 additions & 30 deletions

File tree

docs/SelfUser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **Number** | | [optional] [readonly]
88
**email** | **String** | |
9-
**company** | **String** | | [optional]
109
**firstname** | **String** | |
1110
**lastname** | **String** | |
1211
**createdAt** | **Date** | | [optional] [readonly]
@@ -17,5 +16,6 @@ Name | Type | Description | Notes
1716
**provider** | **String** | | [optional] [readonly]
1817
**providerSub** | **String** | sub from original identity provider | [optional]
1918
**sub** | **String** | sub from Keycloak | [optional] [readonly]
19+
**profilePicture** | **String** | | [optional] [readonly]
2020

2121

docs/User.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **Number** | | [optional] [readonly]
88
**email** | **String** | | [optional] [readonly]
9-
**company** | **String** | | [optional] [readonly]
109
**firstname** | **String** | | [optional] [readonly]
1110
**lastname** | **String** | | [optional] [readonly]
1211
**createdAt** | **Date** | | [optional] [readonly]
@@ -15,5 +14,6 @@ Name | Type | Description | Notes
1514
**projectRole** | **Number** | | [optional] [readonly]
1615
**provider** | **String** | | [optional] [readonly]
1716
**sub** | **String** | sub from Keycloak | [optional] [readonly]
17+
**profilePicture** | **String** | | [optional] [readonly]
1818

1919

src/model/SelfUser.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ class SelfUser {
6262
if (data.hasOwnProperty('email')) {
6363
obj['email'] = ApiClient.convertToType(data['email'], 'String');
6464
}
65-
if (data.hasOwnProperty('company')) {
66-
obj['company'] = ApiClient.convertToType(data['company'], 'String');
67-
}
6865
if (data.hasOwnProperty('firstname')) {
6966
obj['firstname'] = ApiClient.convertToType(data['firstname'], 'String');
7067
}
@@ -95,6 +92,9 @@ class SelfUser {
9592
if (data.hasOwnProperty('sub')) {
9693
obj['sub'] = ApiClient.convertToType(data['sub'], 'String');
9794
}
95+
if (data.hasOwnProperty('profile_picture')) {
96+
obj['profile_picture'] = ApiClient.convertToType(data['profile_picture'], 'String');
97+
}
9898
}
9999
return obj;
100100
}
@@ -112,11 +112,6 @@ SelfUser.prototype['id'] = undefined;
112112
*/
113113
SelfUser.prototype['email'] = undefined;
114114

115-
/**
116-
* @member {String} company
117-
*/
118-
SelfUser.prototype['company'] = undefined;
119-
120115
/**
121116
* @member {String} firstname
122117
*/
@@ -169,6 +164,11 @@ SelfUser.prototype['provider_sub'] = undefined;
169164
*/
170165
SelfUser.prototype['sub'] = undefined;
171166

167+
/**
168+
* @member {String} profile_picture
169+
*/
170+
SelfUser.prototype['profile_picture'] = undefined;
171+
172172

173173

174174

src/model/User.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ class User {
5353
if (data.hasOwnProperty('email')) {
5454
obj['email'] = ApiClient.convertToType(data['email'], 'String');
5555
}
56-
if (data.hasOwnProperty('company')) {
57-
obj['company'] = ApiClient.convertToType(data['company'], 'String');
58-
}
5956
if (data.hasOwnProperty('firstname')) {
6057
obj['firstname'] = ApiClient.convertToType(data['firstname'], 'String');
6158
}
@@ -80,6 +77,9 @@ class User {
8077
if (data.hasOwnProperty('sub')) {
8178
obj['sub'] = ApiClient.convertToType(data['sub'], 'String');
8279
}
80+
if (data.hasOwnProperty('profile_picture')) {
81+
obj['profile_picture'] = ApiClient.convertToType(data['profile_picture'], 'String');
82+
}
8383
}
8484
return obj;
8585
}
@@ -97,11 +97,6 @@ User.prototype['id'] = undefined;
9797
*/
9898
User.prototype['email'] = undefined;
9999

100-
/**
101-
* @member {String} company
102-
*/
103-
User.prototype['company'] = undefined;
104-
105100
/**
106101
* @member {String} firstname
107102
*/
@@ -143,6 +138,11 @@ User.prototype['provider'] = undefined;
143138
*/
144139
User.prototype['sub'] = undefined;
145140

141+
/**
142+
* @member {String} profile_picture
143+
*/
144+
User.prototype['profile_picture'] = undefined;
145+
146146

147147

148148

test/model/SelfUser.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
//expect(instance).to.be();
6767
});
6868

69-
it('should have the property company (base name: "company")', function() {
70-
// uncomment below and update the code to test the property company
71-
//var instane = new bimdata.SelfUser();
72-
//expect(instance).to.be();
73-
});
74-
7569
it('should have the property firstname (base name: "firstname")', function() {
7670
// uncomment below and update the code to test the property firstname
7771
//var instane = new bimdata.SelfUser();
@@ -132,6 +126,12 @@
132126
//expect(instance).to.be();
133127
});
134128

129+
it('should have the property profilePicture (base name: "profile_picture")', function() {
130+
// uncomment below and update the code to test the property profilePicture
131+
//var instane = new bimdata.SelfUser();
132+
//expect(instance).to.be();
133+
});
134+
135135
});
136136

137137
}));

test/model/User.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
//expect(instance).to.be();
6767
});
6868

69-
it('should have the property company (base name: "company")', function() {
70-
// uncomment below and update the code to test the property company
71-
//var instane = new bimdata.User();
72-
//expect(instance).to.be();
73-
});
74-
7569
it('should have the property firstname (base name: "firstname")', function() {
7670
// uncomment below and update the code to test the property firstname
7771
//var instane = new bimdata.User();
@@ -120,6 +114,12 @@
120114
//expect(instance).to.be();
121115
});
122116

117+
it('should have the property profilePicture (base name: "profile_picture")', function() {
118+
// uncomment below and update the code to test the property profilePicture
119+
//var instane = new bimdata.User();
120+
//expect(instance).to.be();
121+
});
122+
123123
});
124124

125125
}));

0 commit comments

Comments
 (0)