Skip to content

Support OData $select for PUT/PATCH/POST #594

Closed
@crackalak

Description

@crackalak

We are using $select on PUT/PATCH/POST requests to filter the properties on the model returned by a successful request. This works well but we cannot get swagger to show $select as an available parameter for these actions.

These are valid operations as per the OData spec http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptions

If I change the code below to return true for PUT/PATCH/POST, all works as it should, and it would also support the other rules of the spec.

https://github.com/microsoft/aspnet-api-versioning/blob/6ea139e77b82266ea1a8cc130b55725f8beeaa42/src/Microsoft.AspNet.OData.Versioning.ApiExplorer/AspNet.OData/Builder/ODataValidationSettingsConvention.cs#L146-L154

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions