-
Hello. I am using orval with a dotnet core backend, and I am trying to bind a array of numbers into a class property. public class MyRequest
{
public int[] ArrayOfNumbers {get;set}
} Then the controllere usage looks like something like this: public async Task<IActionResult> Get([FromQuery] MyRequest query)
{
} The problem is that dotnet adds public class MyRequest
{
[FromQuery(Name = "ResponsibleIds[]")]
public int[] ArrayOfNumbers {get;set}
} The problem now is that the generated code from orval wants me to use a property named "ArrayOfNumbers[]", which then will be considered as "ArrayOfNumbers[][]" in the backend. Is there any way I can fix this with configuring orval to use This is a bit confusing, and my explanation could probably be a bit better sorry. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I solved this by overriding the axios config to remove [] from the query string. |
Beta Was this translation helpful? Give feedback.
I solved this by overriding the axios config to remove [] from the query string.