Skip to content

Deprecate locating query params by the internal property name #197

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

Closed
jaredcnance opened this issue Nov 26, 2017 · 0 comments
Closed

Deprecate locating query params by the internal property name #197

jaredcnance opened this issue Nov 26, 2017 · 0 comments
Milestone

Comments

@jaredcnance
Copy link
Contributor

Currently, filter queries are converted to proper case which is potentially an incorrect assumption and also requires unnecessary string manipulation within each request. To avoid this, we should simply match on the public attribute names. The impact is that use of IQueryAccessor should be updated to use the public name.

Given:

class Resource : Identifiable {
  [Attr("internal-name")]
  public string InternalName { get; set; }
}

Change:

_queryAccessor.GetRequired<string>("InternalName");
_queryAccessor.TryGetValue("InternalName", out string value);

To:

_queryAccessor.GetRequired<string>("internal-name");
_queryAccessor.TryGetValue("internal-name", out string value);

This will be rolled out in 2.1.11 as a non-breaking change. Compatibility for the internal name request will be completely dropped in 3.0.0.

jaredcnance added a commit that referenced this issue Nov 26, 2017

Verified

This commit was signed with the committer’s verified signature.
lucasssvaz Lucas Saavedra Vaz
Closes #197
@jaredcnance jaredcnance added this to the v3.0.0 milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant