spring-projects / spring-projects/spring-hateoas

Add Kotlin extensions for reactive link builders

Open
#2,244 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
476
PR merge metrics
No merged PRs in 30d

Description

The MVC link builder has some great Kotlin extensions that reduce the boilerplate code quite a lot. But when using reactive, which is quite a valid use case when using Kotlin, there is no such support. Writing model assemblers for both reactive and coroutine controllers is cumbersome.
This pull request would simplify model assemblers in these cases: https://github.com/spring-projects/spring-hateoas/pull/2228.

Here's a sample diff of how I could change an existing reactive model assembler with the PR:
image

Here's a another example for the introduced coroutine assembler:
image
Also, in the controller, I do not have to add awaitSingle() after every call of the assembler.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the existing MVC Kotlin extensions with the reactive link builders, then review the changes shown in pull request 2228. Done means reactive and coroutine model assemblers have equivalent Kotlin support and controllers no longer need awaitSingle() after each assembler call.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, spring
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.