feat: removed data attribute from snapshot (#365) #366
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 handled throughout the codebase by removing the
Datawrapper class and directly embeddingDomainobjects withinSnapshot. It introduces a newSnapshotDataResponseDTO to standardize API responses and updates the code, tests, and fixtures accordingly. Additionally, it updates several dependency versions in the Maven build file.Snapshot data model refactor:
Dataclass (src/main/java/com/switcherapi/client/model/criteria/Data.java) and updated theSnapshotclass to store aDomaindirectly instead of via aDataobject. All references toDatain code and tests were refactored to use the new structure. [1] [2] [3] [4] [5] [6] [7] [8] [9]API response handling:
SnapshotDataResponseDTO to wrapSnapshotobjects in API responses, updated the client to parse this new structure, and registered it in the native image reflection config. [1] [2] [3]Build and dependency updates:
junit-jupiter,junit-platform-launcher,maven-compiler-plugin, andcentral-publishing-maven-plugininpom.xml. Also incremented the project version to1.9.0-SNAPSHOT. [1] [2]Native image configuration:
Dataclass and added it for the newSnapshotDataResponseclass. [1] [2]Breaking change
Snapshot content before:
{ "data": { "domain": { "name": "switcher-domain", "activated": true, "group": [...] } } }Snapshot content now:
{ "domain": { "name": "switcher-domain", "activated": true, "group": [...] } }