-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Bug]: Exception on start after upgrade to latest #2885
Comments
Please provide a minimal reproducible example as a GitHub repository that demonstrates the issue you're experiencing so we can look into this further. |
I have the same issue/exception. But I think I found how to workaround it - I have a property defined like:
and I have that exception in 6.6.1 (not in 6.5.0). |
Interesting - what version of .NET are you using? I wonder if this is something to do with changes in .NET 8 that Swashbuckle is now consuming because we have a |
.NET 8.0.5 |
Is it possible you could provide a stack trace that includes our line numbers when the exception happens? I think the changes for #2800 is what's making this issue appear, I'm just having trouble reconciling exactly which code path it's going down when it hits that. I'll try debugging things with the sample you've given me anyway as that will probably point to what's going wrong. |
I've gotten a repro for this based on #2885 (comment) now, thanks. |
Fix SwaggerGeneratorException if the type of a `[DefaultValue]` does not match the type of the property when using System.Text.Json for serialization. Resolves domaindrivendev#2885.
I also have the same scheme:
Not yet tested the workaround above. |
Fix SwaggerGeneratorException if the type of a `[DefaultValue]` does not match the type of the property when using System.Text.Json for serialization. Resolves domaindrivendev#2885.
Fix SwaggerGeneratorException if the type of a `[DefaultValue]` does not match the type of the property when using System.Text.Json for serialization. Resolves domaindrivendev#2885.
Cost me hours. Happy for the fix |
- Fix SwaggerGeneratorException if the type of a `[DefaultValue]` does not match the type of the property when using System.Text.Json for serialization to resolve #2885. - Fix schema generation of default values for nullable enums with System.Text.Json to resolve #2904. - Resolve some IDE refactoring suggestions. - Render the response if an integration test fails.
Thanks for reporting this issue - the fix is available in Swashbuckle.AspNetCore 6.6.2. |
Just tried, it works! Thanks... |
Still having this issue when I do this: |
Describe the bug
Rollbacked to 6.5.0 due to non-sense exception:
Expected behavior
As in 6.5.0 the standard swagger page.
Actual behavior
No response
Steps to reproduce
No response
Exception(s) (if any)
No response
Swashbuckle.AspNetCore version
6.6.1
.NET Version
net 8.0.5
Anything else?
No response
The text was updated successfully, but these errors were encountered: