-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swashbuckle.AspNetCore.Filters throws an exception when trying to use System.Text.Json.Serialization.JsonStringEnumConverter #1356
Comments
see 'NewtonSoft.JSON Support'
|
I think you misunderstood my issue, I don't want to use NewtonSoft, I'm trying to use Swashbuckle along with the new The problem is that it seems Swashbuckle is tightly using Internally Swashbuckle is trying to convert the |
Yes I am seeing the same thing, i.e. that the attribute for System.Text.Json (not Newtonsoft) with [JsonConverter(typeof(JsonStringEnumConverter))] is not taken into account Update: added this to Startup.cs and it is working as expected, fyi @jmevel :
|
Thanks for your answer! Swashbuckle is itself shifting to this new library so it should be the default one in any Swashbuckle Nuget package |
Hi, I'm the author of https://github.com/mattfrear/Swashbuckle.AspNetCore.Filters
|
I'm closing this issue as @mattfrear suggested because I created this ticket on the wrong repository. |
VERSION:
STEPS TO REPRODUCE:
I'm sorry I wanted to create a minimal sample repository so you guys can just clone and check but at my company for security reasons I can't push anything on Github.
Create an ASP.NET 3.1 project.
Here is the
Startup.cs
A
VersionedSwaggerExtensions.cs
file declaring some extension methodsAnd finally a
FooController
EXPECTED RESULT:
Swagger generates the API documentation along with query examples
ACTUAL RESULT:
options.SwaggerEndpoint
throws the following exception (didn't include the full stacktrace)ADDITIONAL DETAILS
Here is the StackOverflow question I created
The text was updated successfully, but these errors were encountered: