spring-projects / spring-projects/spring-hateoas

Support for partial expansion in `UriTemplate`

Open
#544 1 comment 5 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

I often want to expand only some parts of an UriTemplate and keep those variables which have not been passed to UriTemplate.expand(Map<String, ? extends Object> parameters).

I'd like to hear what you think and if it would make sense to add a method with the following signature to the UriTemplate class:

UriTemplate partialExpand(Map<String, ? extends Object> parameters)

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

Start by reading the UriTemplate class and its existing expand(Map<String, ? extends Object> parameters) behavior. Determine how partial expansion should preserve variables that are not supplied, then define the expected results for supplied and missing parameters and add coverage for the proposed partialExpand method.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.