Skip to content

[Feature request]: Support new .NET 8 Model State attributes #2957

@bkoelman

Description

@bkoelman

Is your feature request related to a specific problem? Or an existing feature?

Support for [Length] was recently added in #2882. There are more Model State attributes in .NET 8 that Swashbuckle could potentially support:

ASP.NET .NET Types OpenAPI
[Base64String] string "format": "byte"
[Range(..., MinimumIsExclusive = true, MaximumIsExclusive = true)] int, double, IComparable "exclusiveMinimum": true, "exclusiveMaximum": true
[AllowedValues] any (uses object.Equals) anyOf maybe?
[DeniedValues] any (uses object.Equals) pattern maybe? (tricky to get the escaping right)

Describe the solution you'd like

Please take the entries in the table above into consideration.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature suggestionhelp-wantedA change up for grabs for contributions from the community

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions