Skip to content

Arrays of arrays doesn't work #75

@Assassinbeast

Description

@Assassinbeast

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions