Add possibility to get an array from query parameter the usual way
See original GitHub issueHi,
Currently fast-endpoints needs array to be json formatted when received from query like so:
/my-endpoint?Codes=[1,2,3]
This makes swagger not functional and consumers irritated. The default way is actually that arrays will be passed like this:
/my-endpoint?Codes=1&Codes=2&Codes=3
but currently this will set the array to null
The dto:
public class MyEndpointRequest {
public int[] Codes {get; set; }
}
Is it possible to implement this standard in fast-endpoints, too?
p.s.: thank you very much for this amazing project, I really appreciate it!
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How to pass an array within a query string?
Here's what I figured out: Submitting multi-value form fields, i.e. submitting arrays through GET/POST vars, can be done several different ...
Read more >Arrays in query params
A client MAY request that an endpoint return only specific fields in the response on a per-type basis by including a fields[TYPE] parameter....
Read more >Fun stuff: representing arrays and objects in query strings
Question: what's the correct way to represent arrays and objects in a URL query string? What do you think is the *correct* way...
Read more >Using an array in where clause
Hello everyone, I need to run a query that is filtered by an array, but is not returning the desired result. I have...
Read more >How to send a list/array of values as URL parameters
With a short list / array it is possible to include the values in the query string part of the URL. Its syntax...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, works like a charm, thanks a lot 😃
try
v4.4.0-beta5
i think i finally nailed it 😃the thing is we have to rely on STJ for the creation of different types of object collections that are to be assigned to the
IEnumerable
properties. otherwise we’d have to re-invent a massive wheel.