Fix reference handling in $batch - #482
Merged
Merged
Conversation
…opying. -Allow requests within a batch to reference other requests within the batch whether or not they are in the same changeset. -Added a using for ODataMessageReader in UnbufferedODataBatchHandler.
mikepizzo
force-pushed
the
FixBatchReferences
branch
from
February 11, 2022 06:03
f9d32f9 to
bcd7624
Compare
mikepizzo
marked this pull request as ready for review
February 11, 2022 17:28
mikepizzo
commented
Feb 11, 2022
Fix accidental removal of IsDateOnly and IsTimeOnly signatures from Microsoft.AspNetCore.OData.xml
gathogojr
reviewed
Feb 11, 2022
| List<ODataBatchRequestItem> requests = new List<ODataBatchRequestItem>(); | ||
| ODataBatchReader batchReader = await reader.CreateODataBatchReaderAsync().ConfigureAwait(false); | ||
| Guid batchId = Guid.NewGuid(); | ||
| Dictionary<string, string> contentToLocationMapping = new Dictionary<string, string>(); |
Contributor
There was a problem hiding this comment.
Suggested change
| Dictionary<string, string> contentToLocationMapping = new Dictionary<string, string>(); | |
| Dictionary<string, string> contentIdToLocationMapping = new Dictionary<string, string>(); |
gathogojr
approved these changes
Feb 11, 2022
gathogojr
left a comment
Contributor
There was a problem hiding this comment.
Left a minor comment otherwise LGTM ![]()
xuzhg
reviewed
Feb 11, 2022
| List<ODataBatchRequestItem> requests = new List<ODataBatchRequestItem>(); | ||
| ODataBatchReader batchReader = await reader.CreateODataBatchReaderAsync().ConfigureAwait(false); | ||
| Guid batchId = Guid.NewGuid(); | ||
| Dictionary<string, string> contentToLocationMapping = new Dictionary<string, string>(); |
Member
There was a problem hiding this comment.
why don't we create the dictionary in the "class" itself?
xuzhg
reviewed
Feb 11, 2022
| requests.Add(new ChangeSetRequestItem(changeSetContexts)); | ||
|
|
||
| ChangeSetRequestItem requestItem = new ChangeSetRequestItem(changeSetContexts); | ||
| requestItem.ContentIdToLocationMapping = contentToLocationMapping; |
Member
1 task
kakone
pushed a commit
to kakone/AspNetCoreOData
that referenced
this pull request
Apr 3, 2022
* -Handle relative references in $batch by making URL absolute before copying. -Allow requests within a batch to reference other requests within the batch whether or not they are in the same changeset. -Added a using for ODataMessageReader in UnbufferedODataBatchHandler. * E2E tests to verify changes * Tests for UnbufferedODataBatchHandler * Update Microsoft.AspNetCore.OData.xml Fix accidental removal of IsDateOnly and IsTimeOnly signatures from Microsoft.AspNetCore.OData.xml Co-authored-by: John Gathogo <john.gathogo@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #360
Fixes #481
Fixes #365
-Handle relative references in $batch by making URL absolute before copying.
-Allow requests within a batch to reference other requests within the batch whether or not they are in the same changeset.
-Added a using for ODataMessageReader in UnbufferedODataBatchHandler.
Work remaining:
[x] Add Tests
[x] Fix Reference Handling in UnbufferedODataBatchHandler.