add api description#85
Conversation
|
@FadyGergesRezk @f-s-h In the future, we might change the letter service and report service endpoints so that one can limit the scope so for example only send mail to team and for report only generate report in context of a certain team. For now, this is not too relevant. |
|
I have 3 points regarding this that need some clarification:
|
|
quick follow up on 3 — since the team/feedback/transaction reference fields are all member UUIDs in the db (not emails), resolving by email still leaves me needing my own UUID to match against them, so the token claim is probably the real fix |
|
Regarding the points:
|
|
follow up on 3: it is currently possible to receive the own member id as a token claim. Since we set the member id to be the uuid of the keycloak user on creation, you can just use the following code: |
|
I propose adding a |
|
I also have a question. I have noticed that some entities mention other entities but use only strings. For example, when you get feedback, it mentions the relevant event as a string. But we can have the same event name for 2 different sports, shouldn't we use IDs for that or what? |
|
for the organization endpoints i have two things:
|
|
following up on the nested-teams point — when a team comes back, could these be |
|
two things on the feedback schema:
|
|
on events — i'm planning to show a member whether they missed a past session, computed simply as: event is in the past and their id isn't in if it's "who attended", the missed check works as-is (and members don't need any RSVP/write — it's read-only for them). if it's really an RSVP list, then "not in attendees" doesn't mean missed, so i'd handle it differently. just need the semantics pinned down — no schema change either way. |
It references the primary key which is the ID. I will add the format specifier to all uuid cross references for consistency. |
I added descriptions to all API endpoints. They consist of a short summary followed by a list of what this endpoint returns based on the permission/role of the caller.
Note that these permissions are additive so for example if you are a member of a team and a director of a different sport you get some permissions from that sport and the different team in the same response. The web client will be responsible for filtering out the information it truly needs or it could just call the detail endpoints that only return one object per request.
Closes #7.