-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Cannot define default projection and request specific field #1036
Labels
Milestone
Comments
Below the code that merge the two projection (base.py line 422). For me is working fine with Eve 0.7.1 If you see any use case that are not covered, please provide a PR :)
|
Hugoch
pushed a commit
to Hugoch/eve
that referenced
this issue
Jul 18, 2017
Allow mixed projections as default projection so that fields can be hidden by default and still requested in projections.
huandzh
pushed a commit
to huandzh/eve
that referenced
this issue
Mar 26, 2018
Changes: - Add all fields not excluded to static projection - Add tests and docs to these backward compatible behaviours
huandzh
added a commit
to huandzh/eve
that referenced
this issue
Mar 26, 2018
Fix pyeve#1036 : allow client projection with static exclusion Changes: - Enable client projection with static exclusive projection - Enhance tests and docs accordingly Projection behaviors: - Static projection setting will allow client projection - Static inclusive projection will block sniffing - Static exclusive projection will allow sniffing - Quite weird but backwards compatible... This PR try to patch-fix the issue but not mess up with existing code. However, current code may require some refactoring. - NoneType projections are quite annoying and hard to maintain. Should they always be dictionaries and converted to None later (for flask-pymongo)?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying to exclude a field from a specific endpoint when requesting
/endpoint
. I usewhich works well. I can get the field on demand via
/endpoint?projection={"my_field_to_exclude":1}
(similar to http://python-eve.org/features.html#projection-filestorage).However I want to be able to query the endpoint for a given field with
/endpoint?projection={"another_field":1}
. I expect to get a response withanother_field
only but I only getIf I remove the datasource projection, the field appears.
Any ideas ? I am missing anything ?
Thx !
Using Eve-0.7.4.
The text was updated successfully, but these errors were encountered: