Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Jun 28, 2025

This pull request simplifies the Switcher API by removing the build() method and introducing a new method, getLastExecutionResult(), to retrieve the last execution result. It updates the documentation, tests, and related code to reflect these changes.

API Changes:

  • Removed the build() method from the Switcher interface, simplifying the API by directly chaining methods without requiring an explicit build step. (src/main/java/com/github/switcherapi/client/model/Switcher.java, [1]; src/main/java/com/github/switcherapi/client/model/SwitcherRequest.java, [2]
  • Added the getLastExecutionResult() method to the Switcher interface to retrieve the last execution result, enhancing usability. (src/main/java/com/github/switcherapi/client/model/Switcher.java, [1]; src/main/java/com/github/switcherapi/client/model/SwitcherRequest.java, [2]

Documentation Updates:

  • Updated the README.md to reflect the removal of the build() method and added instructions for using getLastExecutionResult(). (README.md, [1] [2]

Test Updates:

  • Modified tests to remove calls to the build() method and added assertions to validate the behavior of getLastExecutionResult(). (src/test/java/com/github/switcherapi/client/SwitcherBypassTest.java, [1] [2] [3] [4] [5] [6]; src/test/java/com/github/switcherapi/client/SwitcherLocal1Test.java, [7]; src/test/java/com/github/switcherapi/client/SwitcherThrottleTest.java, [8]; src/test/java/com/github/switcherapi/playground/ClientPlayground.java, [9]

Code Cleanup:

@petruki petruki added this to the v2.3.1 milestone Jun 28, 2025
@petruki petruki self-assigned this Jun 28, 2025
@petruki petruki added the enhancement New feature or request label Jun 28, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 8046d76 into master-2 Jun 28, 2025
9 checks passed
@petruki petruki deleted the staging branch June 28, 2025 00:29
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