Skip to content

Add possibility to ignore property when building query #1889

Closed

Description

@Exellion

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

  1. konst-sh commented on Jun 17, 2025

    @konst-sh

    Also need an option to ignore property for automatic query creation

  2. BADF00D commented on Jan 28, 2026

    @BADF00D

    Maybe the NotMappedAttribute can ube used, instead of inventing an new one.

  3. github-actions commented on Apr 4, 2026

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  4. locked as resolved and limited conversation to collaborators on Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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