Skip to content

fix: #542 in SwaggerODataSample #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix: #542 in SwaggerODataSample #567

wants to merge 1 commit into from

Conversation

spaasis
Copy link

@spaasis spaasis commented Oct 28, 2019

$count was not enabled globally, so using it in queries caused a 400 error

Count was not enabled globally, so using it in queries caused a 400 error
@commonsensesoftware
Copy link
Collaborator

Thanks for spending the time on this. Honestly, I feel like this is a bug in OData. What's the purpose of using [EnableQuery] if it only works when you enable to the global query option? I can't really say, but it's worth adding this so it works.

Ultimately, this setting needs to be enabled in both the ASP.NET Core and Web API examples. I've taken the liberty of updating both. I just finishing merging the 4.0 bits so you should see it available now.

I'm going to close this PR as it's no longer necessary, but I referenced in my changes. Thanks.

@spaasis
Copy link
Author

spaasis commented Oct 30, 2019

Oh right, didn't even think about the webapi side of things :)
Yeah, the config is quite confusing in OData. It's not too well documented either...
I opened this to see if it could be made a bit easier: OData/WebApi#1942

Cheers for the 4.0 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants