FIX BED-8688: Make Policy model validation requirements less strict#8
Open
d3vzer0 wants to merge 6 commits into
Open
FIX BED-8688: Make Policy model validation requirements less strict#8d3vzer0 wants to merge 6 commits into
d3vzer0 wants to merge 6 commits into
Conversation
…be read and written as a string
There was a problem hiding this comment.
Pull request overview
This PR updates the Jamf Policy Pydantic models to be more tolerant of Jamf API response shape/typing variability, preventing validation failures in the collection pipeline.
Changes:
- Removes strict enums for
triggerandretry_event, accepting any string value. - Broadens model fields intended to handle inconsistent Jamf API formats (e.g., user group representations).
- Refactors several nested structures (e.g., self service categories, packages, dock items) into dedicated models / stricter annotations.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added several (Policy) model changes to fix/prevent issues for the following:
Retryenum. This change removes the Enum and accepts any (string) value.