Skip to content
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

Parser conflict between UrlConventions KeyAsSegment and last segment == TypeSegment #349

Closed
sleetaylor opened this issue Sep 30, 2015 · 3 comments
Assignees
Milestone

Comments

@sleetaylor
Copy link
Contributor

When submitting a request with a TypeSegment and using UrlConventions KeyAsSegment,(example: /Me/Messages/Microsoft.OutlookServices.EventMessage) the ODataUriParser returns the last segment as a KeySegment and not a TypeSegment. When removing the UrlConventions KeyAsSegment the UriParser recognizes the last segment to be a TypeSegment.

sleetaylor added a commit to sleetaylor/odata.net that referenced this issue Oct 2, 2015
Parser conflict between UrlConventions KeyAsSegment and last segment ==
TypeSegment

This change identifies type segments higher up in the processing, so we
can elect to NOT try to handle it as a key segment if we know it's a
type.
@congysu congysu added this to the 6.14 milestone Oct 8, 2015
@karataliu
Copy link
Contributor

@sleetaylor

Thanks a lot for the PR.

This is designed behavior, when KeyAsSegment is truned on, every element appear in the key placeholder would be treated as key, and you should use '$' to escape all non-key segments.

So /Me/Messages/$/Microsoft.OutlookServices.EventMessage should work for that case.

If taking this, this would introduce breaking changes to existing users who would expect all unescaped key candidates to be actual keys.

VikingsFan added a commit to VikingsFan/odata.net that referenced this issue Nov 5, 2015
VikingsFan added a commit to VikingsFan/odata.net that referenced this issue Nov 6, 2015
VikingsFan pushed a commit that referenced this issue Nov 9, 2015
Parser conflict between UrlConventions KeyAsSegment and last segment ==
TypeSegment

This change identifies type segments higher up in the processing, so we
can elect to NOT try to handle it as a key segment if we know it's a
type.
@VikingsFan
Copy link
Contributor

Checked in f1dcbff

@congysu
Copy link
Contributor

congysu commented Nov 26, 2015

The merged pull requests are #350 and #372.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants