-
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
Actions that capture route values with nested type throw an error when you click to view their documentation details #2380
Comments
Verified that the issue still exists in 6.5.0. Is there anything I can do to help? |
I'm unable to repro on |
This also fails in |
I can see now by looking at your repo that I have a different issue with nested where it won't generate at all.
Not sure how to get to this Inner Exception, haven't been able to spot that anywhere but swagger.json response. I must say when I came across this, it's different to how I would do CQRS usually, from a single class model and not using a Query or Command as a parameter, it does make the actions cleaner though. |
This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made. |
The newly updated README documents a workaround for nested types: Replace the builder.Services.AddSwaggerGen(c =>
{
c.CustomSchemaIds(type => type.FullName.Replace("+", "."));
}); I tested this in my reproduction project, and it worked, so I will mark this as closed. |
After I upgraded from
6.2.3
to6.3.0
, I noticed that clicking on an action to view its documentation details had started throwing errors. It appears to be related to my using properties in nested classes to capture route values. I never saw these errors in6.2.3
.For example, this does not throw an error:
However, this does:
NestedActionModel
is defined as:I have created a reproduction with detailed steps in this repository:
https://github.com/jonsagara/SwashbuckleAspNetCoreRepro
Thank you,
Jon
The text was updated successfully, but these errors were encountered: