azure-functions-openapi-extension icon indicating copy to clipboard operation
azure-functions-openapi-extension copied to clipboard

OpenApiProperty default array unable to cast to string

Open taipignas opened this issue 2 years ago • 1 comments

Describe the issue swagger or open api documentation document generation throws an error: Unable to cast object of type 'System.Int32[]' to type 'System.String'

To Reproduce Steps to reproduce the behavior:

  1. add attribute [OpenApiProperty(Default = new int[] { 2, 3 }, Description = "list", Deprecated = false)]
  2. swagger.json or openapi.yaml generations fail

Expected behavior documentation document is generated without issues

taipignas avatar Jan 18 '23 06:01 taipignas

Which model of Azure Functions are you using: in-process or out-of-process? Which .NET version are you using?

Could you please provide some code snippets showing the class and property you've applied the OpenApiProperty attribute on?

marcin-burak avatar Jan 26 '23 17:01 marcin-burak