Skip to content

How to use AllowedFilterProperties and AllowedExpandProperties under ODataQueryOptionDescriptionContext #928

Closed
@SamGuoMsft

Description

@SamGuoMsft

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Not sure it is a bug or not. But I have scenario that we only have limit properties can be used as expand and filter and would like to show as description in Swagger. I saw ODataQueryOptionDescriptionContext exposes AllowedFilterProperties and AllowedExpandProperties, since we only can set max depth and max node.
options.QueryOptions.Controller()
.Action( c => c.Get( default ) )
.Allow( Filter | Expand )
.AllowExpand( 2 )
.AllowFilter( 4 );

Would you mind to give any suggestions how I can use these two properties?

Expected Behavior

Having a way to use AllowedFilterProperties and AllowedExpandProperties.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

7.0.100

Anything else?

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions