Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

NEXT-7952 Merge request body and request parameter #435

Conversation

manuelselbach
Copy link

@manuelselbach manuelselbach commented Dec 16, 2021

1. Why is this change necessary?

This is needed to e.g. have the "limit=1" available in the payload for the search of products, etc.

2. What does this change do, exactly?

With this change the request parameter and the request body are merged for http methods other than GET.

3. Describe each step to reproduce the issue or behaviour.

url: ... "api/v1/search/product?limit=1"
requestbody =
{
"filter" : [

{ "type" : "equals", "field" : "coverId", "value" : null }

]
}

Expected response:

Response of just one procuct:

"links" :
{ "first" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=1&page=1", "last" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=1&page=701", "next" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=1&page=2", "self" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=1" }
,
"meta" :
{ "totalCountMode" : 1, "total" : 701 }
,

Current response:

Response of 10 products:

"links" :
{ "first" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=10&page=1", "last" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=10&page=71", "next" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=10&page=2", "self" : "http://www.ldbs-shop.de.cloud8-vm556.de-nserver.de/api/v1/search/product?limit=1" }
,
"meta" :
{ "totalCountMode" : 1, "total" : 701 }
,

4. Please link to the relevant issues (if any).

#429

5. Checklist

  • I have written tests and verified that they fail without my change
  • I have squashed any insignificant commits
  • I have created a changelog file with all necessary information about my changes
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

@CLAassistant
Copy link

CLAassistant commented Dec 16, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

github-actions bot commented Dec 16, 2021


Fails
🚫 The title `NEXT-7952 Merge request body and request parameter` does not match our requirements. Example: NEXT-00000 - My Title
🚫 The commit title `NEXT-7952 - Merge request body and request parameter

With this change the request parameter and the request body are merged
for http methods other than GET. This is needed to e.g. have the
"limit=1" available in the payload for the search of products, etc.

Closes #429` does not match our requirements. Example: "NEXT-00000 - My Title, fixes shopwareBoostday/platform#1234"

@manuelselbach manuelselbach force-pushed the feature/429-Search-endpoint-ignores-parameters-limit branch from 32dd379 to 64b0d17 Compare December 16, 2021 15:02
@manuelselbach manuelselbach changed the title Merge request body and request parameter NEXT-00000 Merge request body and request parameter Dec 16, 2021
@manuelselbach manuelselbach force-pushed the feature/429-Search-endpoint-ignores-parameters-limit branch from 64b0d17 to 90a7950 Compare December 16, 2021 15:53
@manuelselbach manuelselbach changed the title NEXT-00000 Merge request body and request parameter NEXT-7952 Merge request body and request parameter Dec 16, 2021
@manuelselbach manuelselbach force-pushed the feature/429-Search-endpoint-ignores-parameters-limit branch from 90a7950 to 67fa06d Compare December 16, 2021 16:30
With this change the request parameter and the request body are merged
for http methods other than GET. This is needed to e.g. have the
"limit=1" available in the payload for the search of products, etc.

Closes #429
@manuelselbach manuelselbach force-pushed the feature/429-Search-endpoint-ignores-parameters-limit branch from 67fa06d to 59d0db9 Compare December 16, 2021 18:23
@shyim
Copy link

shyim commented Dec 17, 2021

Hey @manuelselbach ,

We looked again about the original issue and decided that this current behavior is expected. When POST HTTP method is used, the limit should be in request body. Sorry about the mistake with the issue. We will try to filter next time better our provided issues.

@shyim shyim closed this Dec 17, 2021
@shyim shyim removed the Incomplete label Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants