spring-hateoas icon indicating copy to clipboard operation
spring-hateoas copied to clipboard

Add a template variables contribution SPI

Open reda-alaoui opened this issue 5 years ago • 21 comments
trafficstars

Add a template variables contribution SPI to resolve issues such as #706 This is also a first step (in a 2 steps process) to treat https://github.com/spring-projects/spring-data-commons/issues/2168

reda-alaoui avatar Jun 24 '20 10:06 reda-alaoui

Hello?

reda-alaoui avatar Aug 26 '20 10:08 reda-alaoui

Ping :)

reda-alaoui avatar Dec 25 '20 09:12 reda-alaoui

Is there something I can do to ease the merge of this fix?

reda-alaoui avatar Jan 08 '21 09:01 reda-alaoui

Hello?

reda-alaoui avatar Apr 14 '21 06:04 reda-alaoui

Me again :)

reda-alaoui avatar Jun 15 '21 16:06 reda-alaoui

Hello,

The underlying issue (https://github.com/spring-projects/spring-hateoas/issues/706) seems critical for anyone hopping to use hypermedia pagination with filtering criteria. For a year now, I have been maintaining a forked version of Spring HATEOAS and Spring Data Commons (containing this change and its implementation) to make this work on our main project.

Please help me fix this issue upstream :pray:

reda-alaoui avatar Jul 09 '21 15:07 reda-alaoui

up :sob:

reda-alaoui avatar Oct 22 '22 16:10 reda-alaoui

Merge conflict fixed

reda-alaoui avatar Dec 04 '22 10:12 reda-alaoui

Still waiting for feedback ;(

reda-alaoui avatar Mar 28 '23 15:03 reda-alaoui

@odrotbohm , @gregturn is there a reason related to the proposed change explaining why I have had no feedback for 3 years?

reda-alaoui avatar May 21 '23 18:05 reda-alaoui

Because of this, I have been dragging 2 forks on production for 3 years through all Spring major versions. One for this project, the other for https://github.com/spring-projects/spring-data-commons/issues/2168 .

reda-alaoui avatar May 21 '23 18:05 reda-alaoui

Not at all, except that it somehow has slipped our radar. From a quick glance at the SD Commons issue I can tell, that, generally speaking, as of SD 2.0, null values for Pageable have become invalid and have to be replaced by Pageable.unpaged(). I'll see whether we can be a bit smarter in the DummyInvocationUtils to maybe treat a null Pageable special. I can see that it would be more convenient to just signal absence of pagination information by using a plain null in that particular case.

I'll investigate on Tuesday but can also say that the absence of pagination information in an original request is properly handled by, for example, Spring Data REST. That makes me doubt that we have a fundamental problem which needs a fork to make that work. But then again, I might be wrong of course. Expect some judgement on the overall situation soon.

And again: sorry for the delay and thanks for your patience.

odrotbohm avatar May 21 '23 19:05 odrotbohm

I'll investigate on Tuesday but can also say that the absence of pagination information in an original request is properly handled by, for example, Spring Data REST. That makes me doubt that we have a fundamental problem which needs a fork to make that work.

From what I read around https://github.com/spring-projects/spring-data-rest/blob/e9c43f1373b68c31c14985e189e31ad0a0af31e1/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.java#L122, that would be because Spring Data REST doesn’t use WebMvcLinkBuilderFactory to create those uri templates.

reda-alaoui avatar May 21 '23 21:05 reda-alaoui

Hello @odrotbohm ,

Could you find time to take a look at this? :pray:

reda-alaoui avatar May 25 '23 07:05 reda-alaoui

@odrotbohm sorry to bother you again with this 🥹 I’d like to move to Spring Boot 3.1.0 without those forks ^^

reda-alaoui avatar May 30 '23 21:05 reda-alaoui

I am travelling this week but will make sure I'll have a look ASAP.

odrotbohm avatar Jun 01 '23 15:06 odrotbohm

@odrotbohm please don't hate me for pinging you so much :pray:

reda-alaoui avatar Jun 07 '23 08:06 reda-alaoui

@odrotbohm ping 🫣

reda-alaoui avatar Jun 16 '23 05:06 reda-alaoui

Reda, this is not helpful. I wrote ASAP. There's other stuff we're busy with. Furthermore, as this will be a significant change and like causes downstream effects on projects like Spring Data REST, we can only ship this in a minor version cycle. I.e., the first milestone version this can reasonably go out in will come mid-July, GA in autumn. Thanks for understanding.

odrotbohm avatar Jun 16 '23 06:06 odrotbohm

I understand Oliver. Thank you for providing those details. I’ll keep syncing my forks until then 🙂

reda-alaoui avatar Jun 16 '23 06:06 reda-alaoui

A little reminder 🫣

reda-alaoui avatar Sep 13 '23 13:09 reda-alaoui