Swashbuckle.AspNetCore icon indicating copy to clipboard operation
Swashbuckle.AspNetCore copied to clipboard

[Question]: Specify max and min range for double and decimal datatype

Open c6-dark opened this issue 3 months ago • 4 comments

What are you wanting to achieve?

Because of some requirements, I want to specify max and min values of decimal and double datatype for both of them but in the above case, the swagger is not showing maximum and minimum for both.

What code or approach do you have so far?

[Range[decimal.minvalue, decimal.maxvalue)] public decimal amt { get; set; }

[Range[double.minvalue, double.maxvalue)] public double pamt { get; set; }

How do I achieve the above so the max and min value of decimal and double is shown in swagger

Additional context

No response

c6-dark avatar Nov 07 '24 13:11 c6-dark