Skip to content

Add odata metadata properties to ODataValue #513

Closed
@crackalak

Description

@crackalak

Can metadata be added to ODataValue to support using count?

When using the following attribute parameters
[ProducesResponseType( typeof( ODataValue<IEnumerable<Color>> ), Status200OK )]

It currently produces this as the model:

{
    "value": []
}

Instead of what is really returned:

{
    "@odata.context":"http://localhost/$metadata#Collection(NS.Color)",
    "@odata.count": 3,  
    "@odata.nextLink":"http://localhost/Customers(5)/Colors?$count=true&$skip=2",
    "value": []
}

I have tried creating a class for it myself, however, the swagger docs produced then don't have most of the odata parameters like $filter, $orderby etc.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions