Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Change type of relationship from "users" to "identities" #2206

Open
kwk opened this issue Aug 2, 2018 · 2 comments
Open

Change type of relationship from "users" to "identities" #2206

kwk opened this issue Aug 2, 2018 · 2 comments

Comments

@kwk
Copy link
Collaborator

kwk commented Aug 2, 2018

Whenever we reference a user in a JSONAPI relationship in fabric8-wit , we have either:

"data": {
  "type": "identites",
  "id": "00000000-0000-0000-0000-000000000004"
},
"links": {
  "related": "http:///api/users/00000000-0000-0000-0000-000000000004"
}

or

"data": {
  "type": "users",
  "id": "00000000-0000-0000-0000-000000000004"
},
"links": {
  "related": "http:///api/users/00000000-0000-0000-0000-000000000004"
}

Notice that the type is "identities" or "users".

@sbose78 today in chat said that we shall change all types from "users" to "identities".

@kwk
Copy link
Collaborator Author

kwk commented Aug 2, 2018

Here's the transcript of the the chat:

Konrad Kleine
08:29

@xavier Coulon @shoubhik Bose @alexey Kazakov @aslak Knutsen I'm not sure if somebody already noticed it but whenever we reference a user in a JSONAPI relationshion in fabric8-wit we have either:

"data": {
"type": "identites",
"id": "00000000-0000-0000-0000-000000000004"
},
"links": {
"related": "http:///api/users/00000000-0000-0000-0000-000000000004"
}
or

"data": {
"type": "users",
"id": "00000000-0000-0000-0000-000000000004"
},
"links": {
"related": "http:///api/users/00000000-0000-0000-0000-000000000004"
}
Notice that the type is "identities" or "users". Is that on purpose or should we maybe change all relationships to one of the types?

Shoubhik Bose
08:35

They are distinct. Could you tell me in which cases you see this difference?

Konrad Kleine
08:41

@shoubhik Bose it is in plenty of the places. Just grep through the controller/test-files to find examples for both.

Shoubhik Bose
08:42

We never enforced an enum there as far as I remember.

Shoubhik Bose
08:47

In general, using 'identities' everywhere should work. Because services talk to each other using the identityID and not the userID

Konrad Kleine
09:00

okay, so changing the type to "identities" should be done, right?

@sbose78
Copy link
Member

sbose78 commented Aug 2, 2018

Should be good. Since we expose identityIDs everywhere.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants