Forum Discussion

Ais's avatar
Ais
Frequent Visitor
2 years ago

Default value for array of int as a query param C#

Hi, 

 

Is there any possibility to add default values for an array in C#? 

I have tried attributes, custom filters, and configuration for mapping during the registration of swagger, but nothing gives me the expected result.

 

I would like to achieve pre-filled query params with 12 rows of an integer array. Like this one (but 12 rows):

 

Is it possible? 

I did it for enums and all primitive values, but arrays still win with me. Please help.

Thank you in advance!

 

No RepliesBe the first to reply