Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

Support `ParameterFilter` and `RequestBodyFilter` on `OpenApiOperation` from metadata

Open captainsafia opened this issue 2 years ago • 3 comments

@marcominerva reported an issue in https://github.com/dotnet/aspnetcore/issues/45307 wherein parameter filters are not applied to parameters in OpenApiOperations sourced from metadata.

I believe this happens for ParameterFilters (and like RequestBodyFilters) because these filter types are invoked closer to the creation of those generators where as DocumentFilters and OperationFilters run after the OpenApiOperation has been plucked from metadata.

Is there a strategy we can use to run these filter types across both scenarios without much duplication?

captainsafia avatar Dec 01 '22 06:12 captainsafia

Any progress here?

artyom-p avatar Nov 26 '23 14:11 artyom-p

Still having this problem on .NET 8.0.1

warappa avatar Jan 10 '24 08:01 warappa

This issue is resolved in DotSwashbuckle 3.0.5

Havunen avatar Feb 21 '24 21:02 Havunen