andrebaltieri / Flunt

Validations and Notifications
https://github.com/andrebaltieri/flunt
MIT License
624 stars 162 forks source link

Flunt fields being tracked by swashbuckle #15

Closed Leolima32 closed 6 years ago

Leolima32 commented 6 years ago

Valid and Invalid fields are being tracked by Swashbuckle automatic documentation and marked as required

required

my model

public class FinishCreditCardOrderCommand: Notifiable
    {
        public Guid UserId { get; set; }
        public IList<CartItem> ListOfItems { get; set; } = new List<CartItem>();
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Document { get; set; }
        public string Email { get; set; }

        public string CardHolderName { get; set; }
        public string CardNumber { get; set; }
        public string LastTransactionNumber { get; set; }

        public string PaymentNumber { get; set; }
        public DateTime PaidDate { get; set; }
        public DateTime ExpireDate { get; set; }
        public decimal Total { get; set; }
        public decimal TotalPaid { get; set; }
        public string Payer { get; set; }
        public string PayerDocument { get; set; }
        public string PayerEmail { get; set; }

        public void Validate() { }
   }
andrebaltieri commented 6 years ago

This is an issue related with OpenAPI (Swagger). You should verify if you can mark these properties to DO NOT BE used by them!