apache/airavata-custos

Mismatch in the JSON responses of attributes

Closed this issue · 1 comments

Following endpoints [1] returns the attributes as an array of {"key": "string", "values": []} while the endpoint [2] returns it as {"key": "string", "value": []}.

[1] GET https://custos.scigap.org/apiserver/user-management/v1.0.0/users?offset=0&limit=10&client_id=custos-6nwoqodstpe5mvcq09lh-10000101&user.id=isjarana

{
 "users": [
  {
   "id": "",
   "username": "admin",
   "first_name": "Jhon",
   "last_name": "Smith",
   "password": "",
   "email": "isjarana@gmail.con",
   "temporary_password": false,
   "realm_roles": [
    "admin",
    "offline_access",
    "uma_authorization"
   ],
   "client_roles": [],
   "attributes": [],
   "state": "ACTIVE",
   "creation_time": 1586310938731,
   "last_login_at": 0
  },
...
 ]
}
[2] PUT https://custos.scigap.org/apiserver/user-management/v1.0.0/user/profile

{
 "username": "isjarana",
 "email": "irjanith@gmail.com",
 "first_name": "Isuru",
 "last_name": "Ranawaka j",
 "created_at": "1588023936000",
 "status": "ACTIVE",
 "attributes": [
  {
   "id": "0",
   "key": "a",
   "value": [
    ""
   ]
  },
  {
   "id": "0",
   "key": "b",
   "value": [
    ""
   ]
  }
 ],
 "client_roles": [],
 "realm_roles": [
  "admin",
  "uma_authorization",
  "offline_access"
 ],
 "last_modified_at": "1623198165000",
 "type": "END_USER",
 "membership_type": ""
}

please reopen if not working