-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
I'm using the latest beta version on .NET 7 latest with the latest stable FV. I have the following record and validation rule and I noticed that my swagger doesn't include any of the not empty or length data (I was expecting these to be populated along side the nullable flag to control if they are optional):
public record MyModel(string? InviteToken = null);
public class MyModelValidator : AbstractValidator<MyModel>
{
public MyModelValidator ()
{
RuleFor(u => u.InviteToken).NotEmpty().Length(40).When(m => m.InviteToken is not null);
}
}Looking at the generated swagger.json
"MyModel": {
"required": [
],
"type": "object",
"properties": {
"invite_token": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels