spring-projects / spring-projects/spring-data-rest

Support query parameters both as link and as primary key. [DATAREST-591]

Open
#965 11 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 31, 2020.

type: enhancement
Dominant language
Java
Stars
958
Forks
568
PR merge metrics
No merged PRs in 30d

Description

Petar Tahchiev opened DATAREST-591 and commented

Following on from

https://jira.spring.io/browse/DATAREST-502

I would like to propose to support both syntax queries:

https://localhost:8112/storefront/rest/product/search/findAllByCatalogVersionEquals?catalogVersion=123

and

https://localhost:8112/storefront/rest/product/search/findAllByCatalogVersionEquals?catalogVersion=https://localhost:8112/storefront/rest/product/564488177061440/catalogVersion

As I already mentioned in DATAREST-502 the PK format is currently not supported because of the following lines in UriToEntityConverter:


		if (parts.length < 2) {
			throw new ConversionFailedException(sourceType, targetType, source, new IllegalArgumentException(
					"Cannot resolve URI " + uri + ". Is it local or remote? Only local URIs are resolvable."));
		}

Affects: 2.4.2 (Gosling SR2)

Attachments:

8 votes, 6 watchers

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.