fix #797 - Remove type-cast from SelfLinks. - #798
Closed
uffelauesen wants to merge 2 commits into
Closed
Conversation
KenitoInc
requested review from
ElizabethOkerio,
KenitoInc,
corranrogue9,
gathogojr,
habbes,
lisicase,
mikepizzo and
xuzhg
January 19, 2023 06:56
Contributor
|
Add a description on what this PR is fixing. |
Contributor
Author
|
Hi @KenitoInc
Description added and test pushed to PR branch. |
Contributor
|
Resolved by #831 |
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 issue #797
Type cast segment are no longer added to self links.
Test DerivedTypeNavPropertyLink_FullMetadata shows the expected behavior.
According to http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752341 the cast segment (derived type name) is not to be part of the Canonical URL. odata.id is normally identical to the Canonical URL, but AspNetCoreOData adds the type cast segment to the selfLink and this seems wrong according to spec.
Another place in the spec has a different conflicting example - http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions-complete.html#_Toc453752341 in this part it is described that the resource URL includes the cast segment.
To me it seems wrong that the cast segment should be included in the odata.id - meaning I agree with the first link.