Cannot define default projection and request specific field #1036
I am trying to exclude a field from a specific endpoint when requesting
which works well. I can get the field on demand via
However I want to be able to query the endpoint for a given field with
If I remove the datasource projection, the field appears.
Any ideas ? I am missing anything ?
The text was updated successfully, but these errors were encountered:
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 :)
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)?