dotnet / aspnet-api-versioning

Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
MIT License
3.03k stars 703 forks source link

Support OData Collection Parameters #1075

Closed commonsensesoftware closed 5 months ago

commonsensesoftware commented 5 months ago

Support OData Collection Parameters

Description

This PR adds support for OData collection parameters via the API Explorer for OData functions. The value format is unique to OData functions in the URL. OData actions can have collection parameters in the body as normal JSON arrays. The support only includes primitives, which includes enumerations. OData allows Complex Types, but that is not currently supported.

The issue of formatted or escaped string values cannot be solved. This is a limitation in OpenAPI. A user must input string values as 'text' or "text" unless the author provides some other extension to the Swagger UI to handle quoting of user input.