Skip to content

Add support for C# 11 'required' modifier. #2555

@joel1st

Description

@joel1st

Now that C# has inbuilt language support for required properties, it might be worth discussing how we can take advantage of this with SwashBuckle to provide more accurate, streamlined API documentation.

I think the below comment covers my thoughts on this well:
Since nullablility and required/not are different things where one does not necessarily imply the other, I think SwashBuckle should use the C# property nullability for swagger property nullable, and C# property required/not for the swagger property required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions