hateoas
hateoas copied to clipboard
Same DTO model in multiple route responses. Multiple policies?
To my knowledge, in current version it is not possible to add multiple policies when multiple routes return the same DTO. Let's suppose we have a DTO that returns ID when some object was created; then if the same DTO with ID is used as a response in CreateUser, CreateTeam, CreateBook, etc., all links defined within the policy will be visible everytime.
The solution: maybe an option to specify route name in policy or somehow build policies around controller method with help of expressions - not just around models?