-
Notifications
You must be signed in to change notification settings - Fork 14
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
[MODINVSTOR-1243] Implement endpoint to retrieve items from multiple tenants #755
Conversation
df09026
to
fbdc18a
Compare
1244692
to
e957735
Compare
a574fd7
to
d135a4e
Compare
Quality Gate passedIssues Measures |
return List.of(); | ||
} | ||
return JsonArrayHelper.toList(response.getJson(), ITEMS_FIELD).stream() | ||
.map(item -> item.put(TENANT_ID_FIELD, tenantId)) |
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.
could you say why "tenantId" field is set to the item json? Looks like it does not comply with the response definition because the item schema does not contain "tenantId" field.
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 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.
the field "tenantId" successfully has been added to response because in the code we set it to JsonObject representing item and that allows to add any property
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 think we can improve this in some way, for example by adding tenantId to Item schema explicitly?
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.
I suppose yes, or maybe to add a new response schema for this endpoint that would refer to the item schema
Purpose
[MODINVSTOR-1243] Implement endpoint to retrieve items from multiple tenants
Approach
Screenshots
Verified and left comment on JIRA ticket: https://folio-org.atlassian.net/browse/MODINVSTOR-1243?focusedCommentId=226464