jakartaee / rest

Jakarta RESTful Web Services
Other
351 stars 114 forks source link

Added UriInfo#getMatchedResourceTemplate method #1236

Closed jansupol closed 3 months ago

jansupol commented 3 months ago

Implements #1191

There can be a discussion of the actual method name, as the proposed name was getResourceTemplate, but getMatchedResourceTemplate is more aligned with other matched methods.

Also, the return type can be in the form of a list, but the discussion was to return a string

jansupol commented 3 months ago

Should there be TCK additions to ee.jakarta.tck.ws.rs.ee.rs.core.uriinfo.URIInfoTest?

Definitely. I plan to add those if accepted

jim-krueger commented 3 months ago

Would be nice to get this into 4.0. Not sure if there is enough runway.

jansupol commented 3 months ago

Added the TCK tests

jim-krueger commented 3 months ago

With the TCK I am in favor of adding this to the Jakarta Rest 4.0 content. Can we get a quick vote on this?

@ivargrimstad Can we still add this relatively minor, but nice to have, improvement to 4.0 (assuming it passes a vote)?

jansupol commented 3 months ago

An alternative with returning the List of templates #1245

jansupol commented 3 months ago

I slightly prefer the #1245 over this one

jim-krueger commented 3 months ago

Yes, this was run past Andrew, the originator of the issue and he concurred. So this is the PR that should be merged.