You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to just enforce descriptions for status codes. e.g.:
ChangeAllResponsesByHttpStatusCode(StatusCodes.Status404NotFound, "BadRequest. One or more inputs are invalid.");
I'd assume this should be supported because responseExampleOption and responseExample default to none/null. However, this doesn't work.
First, it requires a generic argument even when no responseExample is passed, which makes no sense. But ok, I tried
ChangeAllResponsesByHttpStatusCode<object>(StatusCodes.Status404NotFound, "BadRequest. One or more inputs are invalid.");
But then I get this error:
InvalidOperationException: A suitable constructor for type 'Unchase.Swashbuckle.AspNetCore.Extensions.Filters.ChangeResponseByHttpStatusCodeDocumentFilter`1[System.Object]' could not be located. Ensure the type is concrete and all parameters of a public constructor are either registered as services or passed as arguments. Also ensure no extraneous arguments are provided.
A new overload for ChangeAllResponsesByHttpStatusCode that just handles descriptions would be nice.
The text was updated successfully, but these errors were encountered:
I would like to be able to just enforce descriptions for status codes. e.g.:
ChangeAllResponsesByHttpStatusCode(StatusCodes.Status404NotFound, "BadRequest. One or more inputs are invalid.");
I'd assume this should be supported because
responseExampleOption
andresponseExample
default to none/null. However, this doesn't work.First, it requires a generic argument even when no
responseExample
is passed, which makes no sense. But ok, I triedChangeAllResponsesByHttpStatusCode<object>(StatusCodes.Status404NotFound, "BadRequest. One or more inputs are invalid.");
But then I get this error:
A new overload for
ChangeAllResponsesByHttpStatusCode
that just handles descriptions would be nice.The text was updated successfully, but these errors were encountered: