Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Oct 5, 2025

This pull request refactors how snapshot data is handled throughout the codebase by removing the Data wrapper class and directly embedding Domain objects within Snapshot. It introduces a new SnapshotDataResponse DTO 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:

  • Removed the Data class (src/main/java/com/switcherapi/client/model/criteria/Data.java) and updated the Snapshot class to store a Domain directly instead of via a Data object. All references to Data in code and tests were refactored to use the new structure. [1] [2] [3] [4] [5] [6] [7] [8] [9]

API response handling:

  • Introduced a new SnapshotDataResponse DTO to wrap Snapshot objects 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:

  • Updated Maven dependencies and plugin versions, including junit-jupiter, junit-platform-launcher, maven-compiler-plugin, and central-publishing-maven-plugin in pom.xml. Also incremented the project version to 1.9.0-SNAPSHOT. [1] [2]

Native image configuration:

  • Removed the reflection config for the deleted Data class and added it for the new SnapshotDataResponse class. [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": [...]
    }
}

@petruki petruki added this to the v1.9.0 milestone Oct 5, 2025
@petruki petruki self-assigned this Oct 5, 2025
@petruki petruki added the enhancement New feature or request label Oct 5, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2025

@petruki petruki merged commit bf7c814 into master Oct 5, 2025
13 checks passed
@petruki petruki deleted the staging branch October 5, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants