crnk-project / crnk-framework

JSON API library for Java
Apache License 2.0
285 stars 153 forks source link

Design question for chess-like game (get calculated attribute from request) #873

Open MartenBE opened 1 year ago

MartenBE commented 1 year ago

Hello everyone, I have developed a chess game backend with crnk.io . Here I made a repository for games, players and moves. Everything works with the crnk annotations and repositories, but now I am in need of some additional functionality. I'd like to request all possible moves from the backend for the position in a certain game. What is the best way to go about this? I don't want to store this information, but like it to be a part of the game repository. So I'm guessing a custom parameter in the request and a meta object in the response? Unfortunately, I don't find any examples on how to achieve this ... Can someone give me some pointers?