-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fields=all returns customized field values #7771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's a good change.
I only have small suggestions
@@ -58,7 +81,7 @@ paths: | |||
description: Barcode of the product | |||
patch: | |||
summary: WRITE Product - Create or update product (API V3 - Implementation in progress) | |||
operationId: post-api-v3-product-barcode | |||
operationId: patch-api-v3-product-barcode | |||
responses: | |||
'200': | |||
description: |- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the explanation below not in the content schema with an entry "fields" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a fields entry in the content schema for the request (which is above), below is the content schema of the response (which does not have a fields entry, but is affected by the fields parameter in the query)
@@ -74,7 +74,7 @@ | |||
"2xxxxxxxxxxx" | |||
], | |||
"complete" : 0, | |||
"completeness" : "0.5", | |||
"completeness" : 0.5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you understand why you have this flip-flap between string and raw numbers ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexgarel it's an issue with JSON:PP which select the type (string or number) based on what the last use of the scalar was. I tried to find out what exactly was using those scalars in a string context (like a debug dump function), but I failed.
Co-authored-by: Alex Garel <alex@garel.org>
…erver into fields-all
Kudos, SonarCloud Quality Gate passed! |
fields=all had a difficult to understand behaviour: it returned all raw fields, without customization. Which meant that asking for packagings in v3 would return a different packagings field that asking for all in v3.
This PR: