Skip to content

[Bug] FunctionMetadataGenerator does not assign cardinality as many for IEnumerable<> scenarios #1204

@surgupta-msft

Description

@surgupta-msft

Investigate and fix in FunctionMetadataGenerator and Source Generation why Cardinality is not assigned to Many when function binds to IEnumerable<> type. This stops the collection support even when it is enabled by the extension - here as Host uses the value of cardinality to assign array type.

Sample function for repro -

[Function("Function")]
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req,
    [BlobInput("input-container", Connection = "AzureWebJobsStorage")] IEnumerable<string> blobs)
}

Current output function.metadata -

  "bindings": [
      {
        "name": "data",
        "type": "blob",
        "direction": "In",
        "blobPath": "input-container",
        "connection": "AzureWebJobsStorage"
       // "cardinality": "Many" --> Expected here
      },
      {
        "name": "$return",
        "type": "http",
        "direction": "Out"
      }
    ]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions