hateoas icon indicating copy to clipboard operation
hateoas copied to clipboard

Same DTO model in multiple route responses. Multiple policies?

Open adambajguz opened this issue 4 years ago • 2 comments

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?

adambajguz avatar May 09 '20 11:05 adambajguz