-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Hi,
Using Http trigger function with Open Api integration, Swagger UI will fail to render if there is a byte[] type in your response.
Very easy to reproduce, create a new Http trigger project with open API integration. Decorate your function with something like:
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "application/json", bodyType: typeof(TestResponse), Description = "The OK response")]
And make sure TestResponse has a byte array.
public class TestResponse { public byte[] TestContent { get; set; } }
By navigating to swagger UI you get: "Failed to load API definition".
Trying to load swagger.json manually throws: "Sequence contains no elements" error.
Am i missing something obvious or is there any quick workaround for this ?
Thanks