Skip to content

Add possibility to ignore property when building query #1889

Open
@Exellion

Description

The problem described in bug

I believe it will be useful if we can omit some properties when using Query attribute.
For example, I have query model:

public class QueryParams
{
     [AliasAs("data")]
     public string Data { get; set; }

     // Some property for internal use only. Should be omitted in any query
     public string SomeForInternalUse { get; set; }
}

and some query:

[Post("/api/v1/someEndpoint")]
Task MakeRequestAsync([Query] QueryParams parameters)

I need to ignore property SomeForInternalUse

My proposals:

  1. Add [QueryIgnore] attribute
  2. Alternatively, use [AliasAs(null)] (it works previously and was unknowingly fixed in 1b45219)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions