You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been appreciating the help I've been getting so far! Two issues here which I can split if that's more helpful.
The main issue (for which I don't have a workaround) is when I configure an EntityTypeConfiguration with .Page(), the corresponding $top and $skip query parameters are not presented in the ApiExplorer/Swagger.
The second issue I noticed can be demonstrated in the FoosController in the above project as well. If the method Get above is named GetFoos it doesn't show up in ApiExplorer/Swagger as I would expect, based on documented routing conventions. These docs don't mention usage of ODataQueryOptions<> so maybe this behavior doesn't apply? Just thought I'd mention this in case it's an issue. My main priority is the $top/$skip issue as a working Swagger app for every API at my company is a table-stakes requirement.
Thanks again!
The text was updated successfully, but these errors were encountered:
Adding explicitly the EnableQueryAttribute will make $top and $skip to appear in the swagger documentation.
We have defined a default EnableQueryAttribute set with some values from our configuration with a custom MaxNodeCount added as follows: services.AddODataQueryFilter( defaultEnableQuery ).
If we add explicitly the EnableQueryAttribute on the action without MaxNodeCount set the default value is not used, instead the EnableQueryAttribute default value is used.
Yikes! So sorry I never replied on this. Is this still an issue? Did adding [EnableQuery] solve the problem? There have historically be a bunch of gaps and inconsistencies in how or where query options can be applied. It's changed over the years too.
The 6.0 release is just around the corner, which will have support .NET 6.0 and OData 8.0. You can see the latest code and examples here. If this is still an issue, I'd certainly like to get it patched and make sure that it works properly in the upcoming release.
If this isn't an issue anymore, then we should close it out. I'm in the process of cleaning up all the open issues. Again, sorry for my poor follow-up on this one. I hope you eventually got something working.
Last call. Has there been any other updates or progress? 6.0 has been officially released. If this is now resolved, I'd like to close it out. If there is more to do, then this item can finally move up in the queue.
Uh oh!
There was an error while loading. Please reload this page.
Hello again,
Been appreciating the help I've been getting so far! Two issues here which I can split if that's more helpful.
The main issue (for which I don't have a workaround) is when I configure an
EntityTypeConfiguration
with.Page()
, the corresponding$top
and$skip
query parameters are not presented in the ApiExplorer/Swagger.In the above example,
$select
,$expand
,$filter
,$orderby
, and$count
all show up, but$top
and$skip
do not.Sample project here.
The second issue I noticed can be demonstrated in the
FoosController
in the above project as well. If the methodGet
above is namedGetFoos
it doesn't show up in ApiExplorer/Swagger as I would expect, based on documented routing conventions. These docs don't mention usage ofODataQueryOptions<>
so maybe this behavior doesn't apply? Just thought I'd mention this in case it's an issue. My main priority is the$top
/$skip
issue as a working Swagger app for every API at my company is a table-stakes requirement.Thanks again!
The text was updated successfully, but these errors were encountered: