HelpPage is really not supported for OData based controllers and that is the reason we explicitly set the [ApiExplorerSetting(IgnoreAPI = true)]
attribute on ODataController
. Even if you have tried making this setting to be false
, it cannot be guaranteed that all the stuff(displaying all routes, samples generated) would work as expected, so I would suggest not to follow this approach.
WebAPI Help Pages doesn't show all endpoints for OData controller
-
06-10-2022 - |
Frage
I added Help Pages component for my ASP.NET MVC Web API with OData. To make it working I had to specify [ApiExplorerSetting(IgnoreAPI = false)] explicitly.
However, it shows default GET endpoint only, like: api/Customers.
But my API also supports GET by ID and some Navigation properties, like: api/Customers(id) and api/Customers(id)/ContactPerson
Is there a way to make Help Pages auto-generate those endpoints to?
Thank you !
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow