Skip to content

[Bug]: [AliasAs(null)] does not omit property anymore #1878

@Exellion

Description

@Exellion

Describe the bug 🐞

Previously, I can use AliasAs(null) to mark some properties that shouldn't be included in query parameters. For now (v.7.2.1) it does not work anymore.

Step to reproduce

  1. Mark some property with attribute AliasAs(null)
public class QueryParams
{
     [AliasAs("data")]
     public string Data { get; set; }

     [AliasAs(null)]
     public string SomeForInternalUse { get; set; }
}
  1. Make request like similar
[Post("/api/v1/someEndpoint")]
Task MakeRequestAsync([Query] QueryParams parameters)
  1. Result url will be:
/api/v1/someEndpoint?data=<value>&SomeForInternalUse=<value>

Reproduction repository

https://github.com/reactiveui/refit

Expected behavior

The result url should be (and it was previously so)

/api/v1/someEndpoint?data=<value>

Screenshots 🖼️

No response

IDE

No response

Operating system

No response

Version

No response

Device

No response

Refit Version

7.2.1

Additional information ℹ️

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions