Skip to main content
22 votes
Accepted

How to design for API use cases that need different data from the same table?

In the end, there is no "right" or "wrong" in this situation, so my advice can only be on a very general level. You seem to be falling into the trap of leaking a certain design ...
mtj's user avatar
  • 2,342
7 votes

How to design for API use cases that need different data from the same table?

For this answer I assumed that the terms tournament_id and event_id are equivalent, although you didn't state that explicitly in your question. As mtj pointed out in their answer you shouldn't design ...
Tim's user avatar
  • 179
5 votes

How to design for API use cases that need different data from the same table?

Essentially you need three endpoints. Not worrying about the paths for now we have.. GetPlayerById?id= Returns a single player by id for the player info page. GetPlayersInATournament?tournamentId= ...
Ewan's user avatar
  • 79.8k
4 votes
Accepted

Designing a Role-Based Permission System for FastAPI: Integer Roles vs Database Roles?

In the context of microservices, neither of the options you presented is viable. Microservices are meant to be independently deployable, which means that it must be possible to deploy a new version of ...
Bart van Ingen Schenau's user avatar
1 vote

What is the best way to comment a deprecated class in Java?

What you do not do is remove any documentation. Think about it: The class is deprecated so I want to replace all its uses. And I want to do that without breaking anything. To replace uses of the class ...
gnasher729's user avatar
  • 47.5k

Only top scored, non community-wiki answers of a minimum length are eligible