Skip to content

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

Discussion options

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

Comment options

You must be logged in to vote
4 replies
@sliekens
Comment options

@commonsensesoftware
Comment options

@sliekens
Comment options

@commonsensesoftware
Comment options

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