Skip to content

Question regarding $count in SomeOdataOpenapiExample #938

Discussion options

You must be logged in to vote

This is a great question. I believe you are asking why you don't get the @odata.count annotation in the response when $count=true. Correct me if I'm mistaken. This happens because you are only using some of OData. Specifically, you are only using the OData query options, you aren't using any other part of OData. In order to get an OData formatted response, you need the OData media type formatters which are part of the full OData stack. I'm not sure if you can use the OData media type formatters without an EDM; I suspect not. Even if they are supported, you should be aware that it will likely change the shape of your response.

If your response is:

[
 {...},
 {...}
]

The OData equivalent with

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@HOGENTJasperDeSmet
Comment options

Answer selected by HOGENTJasperDeSmet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants