-
Notifications
You must be signed in to change notification settings - Fork 54
Fields support #248
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
Fields support #248
Conversation
Fields support. https://v3-apidocs.cloudfoundry.org/version/3.197.0/index.html#fields As specified in the API description. Navigable object would contain only data from includes returned by fields query params.
I believe if proper handling for KeyError would be implemented here: |
@krismarc I am ok to offer the possibility to declare ask the backend to return only necessary fields; however, when it comes to KeyError, I would prefer not implement a fallback which could turn in a great complexity on code side.... And maybe in a endless loop if the accesssed key would not exist. If the caller asks for specific fields and tries to access some others... well... That's his/her problem. I would like some unit tests just to garantee there is no issue..now and in the future. After re-reading the code I see thats navigation and links already has fallback on empty object so I don't think it will break on missing fields |
@antechrestos, sorry, I've missed your response. By any chance, are you able to generate test payloads? If not, I will handle somehow. Does it also mean, that you agree with the way how to declare that ask to the backend? Regarding that fallback, this was also my impression and why I suggested that you know the code better than anyone else 😄 btw, I've also raised a question with controller maintainers why there are no includes for service instances -> cloudfoundry/cloud_controller_ng#4450, I'd love this one in combination with this project. As I've mentioned here. In combination with includes, reading CF would be really fast. |
@antechrestos I've added a note within readme and tests for service instances. Would that be sufficient? |
@krismarc everything seems well despite the fact thtwe use lint. You can check linting by running poetry run flake8 --show-source --statistics |
done |
@krismarc thank you for your contribution. |
@krismarc 1.39.0 released |
Fields support. No idea if it fits into your design. However, if you agree, I could come up with some tests, readme update etc.
Fields param as specified in the API description. Navigable object would contain only data from includes returned by fields query params.