-
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
Regression when updating from v5 to v6 regarding nullable types #2503
Comments
This is by design in order to comply strictly with the OpenAPI spec because
So, when you're API description says a
And, this is not the same as saying it can be omittied (
Furthermore, if |
So, it might be worth understanding why you need
|
@liesahead services.AddTransient<ISchemaGenerator, XXXSchemaGenerator>(); |
@zhuhuanzi , didn't find an example with custom schema in referenced issue. |
We have tried to work around this problem by using a parameter filter:
|
To make issue tracking a bit less overwhelming for the new maintainers (see #2778), I've created a new tracking issue to roll-up various nullability issues here: #2793. We'll refer back to this issue from there and include it as part of resolving that issue, but I'm going to close this one to help prune the backlog. |
Upgrading from
v5.6.3
tov6.2.3
(orv6.4.0
, no difference) and generated schema is different now.In
v5.6.3
it wasBut now it's like this
Question is, how to make all nullable properties to have that
"nullable": true
in the schema again?Tried to use
options.SupportNonNullableReferenceTypes
, but it has no effect.The text was updated successfully, but these errors were encountered: