GWTP icon indicating copy to clipboard operation
GWTP copied to clipboard

@MatrixParam in REST Dispatch

Open harry-peirse opened this issue 10 years ago • 5 comments

Hi there, Any reason why Matrix Params aren't supported in REST Dispatch? I would be happy to create a PR for it, but I wanted to check if there was a special reason why it wasn't supported already?

harry-peirse avatar Nov 24 '14 16:11 harry-peirse

The reason why they were pushed so far in the process is because they require a couple more features for a complete implementation. Namely, regex in the path params and some support for PathSegment (the only way those params can be introduced in a segment that is not the last one). I'm actually in the process of rewriting a good part of the generators to allow for more modularity, but they are next in the road map along with @CookieParam. Feel free to contribute, although this may be a bad timing because of the generators rewrite and all the merge conflicts this will likely cause.

Chris-V avatar Nov 24 '14 16:11 Chris-V

I only think it hasn't been implemented 'yet' :D In the production apps where we use Rest-Dispatch, we're not using much MatrixParams but it should definitely be implemented!

christiangoudreau avatar Nov 24 '14 16:11 christiangoudreau

Ah, thanks for the update Chris! I'll hold off then for now. Let me know if there's anything I can do. We're (probably) using REST dispatch in quite a large project and many of our APIs use Matrix Params... for the moment I know it's possible to hardcode them in the path and treat them like Path Params but it obviously isn't ideal...

harry-peirse avatar Nov 24 '14 16:11 harry-peirse

@Chris-V I believe you merged a PR for this?

meriouma avatar Mar 04 '15 18:03 meriouma

Yes. It's only @MatrixParam though. Support for path segments will come later.

Chris-V avatar Mar 04 '15 18:03 Chris-V