Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays of arrays doesn't work #75

Closed
Assassinbeast opened this issue Mar 20, 2021 · 3 comments · Fixed by #82
Closed

Arrays of arrays doesn't work #75

Assassinbeast opened this issue Mar 20, 2021 · 3 comments · Fixed by #82
Labels
bug Something isn't working resolved Request has been resolved v0.6.0

Comments

@Assassinbeast
Copy link

Hi, models that have List<List<string>> or Dictionary<string, List<string>> properties get generated incorrectly

For example, if i have a function like this

public class Foo
{
	public List<List<string>> Items { get; set; }
}

public class TestFunction
{
	[FunctionName("Test")]
	[OpenApiOperation(operationId: "Test")]
	[OpenApiResponseWithBody(HttpStatusCode.OK, "application/json", typeof(Foo))]
	public IActionResult GetTest(
		[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "test")] HttpRequest req)
	{
		return new OkResult();
	}
}

Then the Items property will become an string array, and not an array of arrays.

image

The same happens if i have a Dictionary<string, List<string>> .
Then the property will become Dictionary<string, string>

@Assassinbeast Assassinbeast changed the title Arrays in arrays doesn't work Arrays of arrays doesn't work Mar 20, 2021
@justinyoo justinyoo added the bug Something isn't working label Apr 3, 2021
@justinyoo
Copy link
Contributor

@Assassinbeast Thanks for the issue! I can repro the issue on my end. Let me check.

@justinyoo
Copy link
Contributor

@Assassinbeast It's been released to NuGet. Please have a look and let us know.

@Assassinbeast
Copy link
Author

@Assassinbeast It's been released to NuGet. Please have a look and let us know.

Amazing! Seems to be working.
Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Request has been resolved v0.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants