Removed data wrapper from Snapshot to standardize schema #23
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.



This pull request refactors how snapshot data is structured and accessed throughout the codebase. The main change is the removal of the top-level
datakey from snapshot JSON files and related code, so thatdomainis now the top-level key. This impacts snapshot loading, serialization, deserialization, and test fixtures. The update simplifies data access and unifies the data structure across the application and tests.Snapshot Data Structure Refactor
Changed snapshot JSON format to use
domainas the top-level key instead of nesting underdata, and updated all code and tests to match this new structure (switcher_client/lib/types.py,switcher_client/lib/snapshot_loader.py, test snapshots, and related test utilities). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Updated
Snapshotclass to remove theSnapshotDatawrapper and directly store thedomainobject, simplifying attribute access throughout the codebase (switcher_client/lib/types.py). [1] [2]Refactored all snapshot access patterns to use the new structure, including in
snapshot_version,check_criteria, andvalidate_snapshotfunctions (switcher_client/client.py,switcher_client/lib/resolver.py,switcher_client/lib/snapshot_loader.py). [1] [2] [3]Remote and Serialization Updates
domainkey (switcher_client/lib/remote.py,switcher_client/lib/types.py). [1] [2]These changes collectively unify and simplify how snapshot data is handled across the codebase.