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

Add possibility to ignore property when building query #1889

Open
Exellion opened this issue Oct 23, 2024 · 0 comments
Open

Add possibility to ignore property when building query #1889

Exellion opened this issue Oct 23, 2024 · 0 comments

Comments

@Exellion
Copy link

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)
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

3 participants
@Exellion and others