Open sergey-litvinov-work opened 5 years ago
Thanks, this looks quite useful!
Just to make sure, this is not a breaking change, correct? It seems like it is not, but I'd rather make sure.
Also, do you think it is possible to write a test for this new functionality? I'd love not to break it accidentally in the future.
@joukevandermaas sorry for so long answer. I missed your answer. so it didn't work for us so well, so we handled it in different way on top of Saule
. It shouldn't be breaking changes as initially it worked only for HandlesAttribute
and after that change it will be working for every case
If you want this change, i can add more unit tests and update PR
Hi Jouke,
We had a case when WebApi action has
ObjectContext
parameter and thenHandlesQuery
attribute passes currentObjectContext
value as paramter. So endpoint can consume\handle current context.I did two changes there:
I moved that code that initialize
ObjectContext
in action's parameter to more common placeQueryContextUtils
so now it will be available to any action that needs it, and not only by action that hasHandlesQuery
. So if endpoint withAllowsQuery
wants to get current context for logging\other reasons, then it can get itI also added
Fieldset
initialization toHandlesQuery
so now it also can usefields
logic too. As before that it would ignore it andObjectContext
won't parse actualFieldset
value