Appendix
Errors
ODataException: Invalid JSON. An unexpected comma was found in scope 'Object'. A comma is only valid between properties of an object or between elements of an array.
A comma appended to the last property of a JSON formatted request body.
General developer notes
OData
IActionResult
is used when multiple return types are possible, otherwiseActionResult<T>
can be used. The type property ofProducesResponseTypeAttribute
can be excluded forActionResult<T>
.OData functions can only be
HttpGet
, OData actions can only beHttpPost
.By protocol specification
enums
are serialized using the enum member's string, not its value.Routing conventions (only partly applicable for AspNetCore.OData v.8).
$ref is not supported.
Reasonably accurate OData examples.
Explicit
From
parameter bindings are required, otherwise Swashbuckle will describe them as query parameters by default. Code comments of parameters decorated withFromForm
do not show up (#2519).
Last updated
Was this helpful?