Skip to content

OData API explorer only showing $select and $expand, help #1038

You must be logged in to vote

OData, both in protocol and implementation, only supports returning JSON or XML. To be fully compliant, the payloads are supersets that are specific to OData. You cannot return just any 'ol JSON. I'm not sure if XML is even still supported. I know it's not by default.

In the context of OData, there should be no need to specify [Produces]. OData-based responses will list the equivalent values from the OData InputFormatter and OutputFormatter implementations. The API Explorer knows that the results are for OData because you are using ODataController, which has [ODataRouting] applied. You should notice that there are actually several media types reported (but you probably expected one). You'…

Replies: 1 comment 4 replies

You must be logged in to vote
4 replies
@sliekens

@commonsensesoftware

@sliekens

@commonsensesoftware

Answer selected by sliekens
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