-
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
[Feature request]: Support new .NET 8 Model State attributes #2957
Comments
I am working on it :) |
I have doubts regarding AllowedValues. The DeniedValues could be done with a Regex but I prefer waiting for it to be a built in function, on the OpenApi spec |
That's understandable. It highly depends on how the popular client generators and SwaggerUI interpret these constructs. Enum values aren't quoted in the spec, so I wonder how strings containing whitespace would work. I'm fine with leaving them out, I just listed them for completeness. |
Ok then so I am removing the draft from the PR :) |
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:[Base64String]
string
"format": "byte"
[Range(..., MinimumIsExclusive = true, MaximumIsExclusive = true)]
int
,double
,IComparable
"exclusiveMinimum": true, "exclusiveMaximum": true
[AllowedValues]
object.Equals
)anyOf
maybe?[DeniedValues]
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
The text was updated successfully, but these errors were encountered: