Implement skip_expression_validation, update sort and filter values for Jamf Pro 11.3 #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow on work from #57 There may be future work planned to more efficiently or dynamically validate support fields, but for now the API continues to outpace SDK releases.
My suggestion here is to support optionally skipping validation altogether for applicable endpoints. I've added an implementation for a new param
skip_expression_validation
, a boolean which isFalse
by default. I'm not familiar with the extended typing system used so please correct me wherever the pattern is wrong. Though I think validation is a good goal, the API's response is already clear when an unsupported field is used. With additional validation occurring in the SDK, the result in many cases is not being able to use the endpoint at all.Example usage:
I've also updated the existing fields in
api_options.py
. Where I made changes I chose to sort by alpha, though that's not approximate to the API docs. Don't think it was "wrong" and made diffing easier.Let me know thoughts or if this is a change you'd consider. Thank you!