Skip to content
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

Configure non-nullable types as required #2710

Closed
wants to merge 3 commits into from

Conversation

blouflashdb
Copy link
Contributor

Closes #2036

@blouflashdb
Copy link
Contributor Author

Seems like the build pipeline is broken but this should have nothing to do with my changes.

@piskov
Copy link

piskov commented Oct 8, 2023

@blouflashdb there’s one more thing to consider: default values

public string Prop { get; init; } = "default value";

It’s non-nullable, yet it shoudn’t be required as it has a default value.

See how ASP validation is working as a result of this issue

@blouflashdb
Copy link
Contributor Author

You are right, I should take a look at the implementation in AspNetCore to match the behavior in Swashbuckle.

@blouflashdb blouflashdb marked this pull request as draft October 9, 2023 08:14
@kpko
Copy link

kpko commented Oct 25, 2023

Hi, this feature would help a lot, especially with generating APIs from swagger documents :) Is there a way to help this move forward?

@martincostello
Copy link
Collaborator

Thanks for contributing - if you'd like to continue with this pull request, please rebase against the default branch to pick up our new CI.

@martincostello
Copy link
Collaborator

Contributes to #2793.

@martincostello
Copy link
Collaborator

#2036 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure non-nullable types as required
4 participants