Skip to content

Deprecate locating query params by the internal property name #197

Closed
@jaredcnance

Description

@jaredcnance

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions