-
Notifications
You must be signed in to change notification settings - Fork 350
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
Fixes #3154: Enable serialize/deserialize navigation property with count without content #3155
base: main
Are you sure you want to change the base?
Conversation
…unt without content
Copilot
AI
left a comment
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.
Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.
Files not reviewed (2)
- src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs: Evaluated as low risk
- src/Microsoft.OData.Core/Json/ODataJsonResourceSerializer.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)
test/FunctionalTests/Microsoft.OData.Core.Tests/ScenarioTests/Writer/Json/FullPayloadValidateTests.cs:852
- [nitpick] The term 'Inlinecount' should be changed to 'Count' to maintain consistency with the rest of the codebase. The method name should be 'WritingNestedCountWithoutContentTest'.
public void WritingNestedInlinecountWithoutContentTest()
test/FunctionalTests/Microsoft.OData.Core.Tests/ScenarioTests/Writer/Json/FullPayloadValidateTests.cs:954
- [nitpick] The term 'Inlinecount' should be changed to 'Count' to maintain consistency with the rest of the codebase. The method name should be 'ReadingNestedCountWithoutContentTest'.
public void ReadingNestedInlinecountWithoutContentTest()
@@ -968,7 +968,7 @@ protected override void WriteDeferredNestedResourceInfo(ODataNestedResourceInfo | |||
Debug.Assert(this.writingResponse, "Deferred links are only supported in response, we should have verified this already."); | |||
|
|||
// A deferred nested resource info is just the link metadata, no value. | |||
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker); | |||
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker, count: true); |
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 count parameter should be set to false when calling WriteNavigationLinkMetadata for deferred nested resource info.
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker, count: true); | |
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker, count: false); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -999,7 +999,7 @@ protected override void StartNestedResourceInfoWithContent(ODataNestedResourceIn | |||
} | |||
|
|||
// Write the nested resource info metadata first. The rest is written by the content resource or resource set. | |||
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker); | |||
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker, count: false); |
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 count parameter should be set to true when calling WriteNavigationLinkMetadata for nested resource info with content.
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker, count: false); | |
this.jsonResourceSerializer.WriteNavigationLinkMetadata(nestedResourceInfo, this.DuplicatePropertyNameChecker, count: true); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -2038,7 +2038,7 @@ protected override Task WriteDeferredNestedResourceInfoAsync(ODataNestedResource | |||
// A deferred nested resource info is just the link metadata, no value. | |||
return this.jsonResourceSerializer.WriteNavigationLinkMetadataAsync( | |||
nestedResourceInfo, | |||
this.DuplicatePropertyNameChecker); | |||
this.DuplicatePropertyNameChecker, count: true); |
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 count parameter should be set to false when calling WriteNavigationLinkMetadataAsync for deferred nested resource info.
this.DuplicatePropertyNameChecker, count: true); | |
this.DuplicatePropertyNameChecker, count: false); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -2078,7 +2078,7 @@ await this.jsonResourceSerializer.WriteNestedResourceInfoContextUrlAsync(innerNe | |||
// Write the nested resource info metadata first. The rest is written by the content resource or resource set. | |||
await this.jsonResourceSerializer.WriteNavigationLinkMetadataAsync( | |||
innerNestedResourceInfo, | |||
this.DuplicatePropertyNameChecker).ConfigureAwait(false); | |||
this.DuplicatePropertyNameChecker, count: false).ConfigureAwait(false); |
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 count parameter should be set to true when calling WriteNavigationLinkMetadataAsync for nested resource info with content.
this.DuplicatePropertyNameChecker, count: false).ConfigureAwait(false); | |
this.DuplicatePropertyNameChecker, count: true).ConfigureAwait(false); |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Can you confirm why the build pipeline is failing. |
Fixes #3154: Enable serialize/deserialize navigation property with count without content