Skip to content

Closes #342 - Added switcher.relay.restrict to allow or bypass Relay check when local#344

Merged
petruki merged 2 commits intomasterfrom
staging
Jun 15, 2025
Merged

Closes #342 - Added switcher.relay.restrict to allow or bypass Relay check when local#344
petruki merged 2 commits intomasterfrom
staging

Conversation

@petruki
Copy link
Member

@petruki petruki commented Jun 15, 2025

  • Improved model definition
  • Improved snapshot local file with custom serialization
  • Added switcher.relay.restrict context attribute

Example using with context

@Override
protected void configureClient() {
	configure(ContextBuilder.builder()
			.context(Features.class.getCanonicalName())
			.url("https://api.switcherapi.com")
			.apiKey(System.getenv("switcher.api.key"))
			.component(System.getenv("switcher.component"))
			.domain(System.getenv("switcher.domain"))
			.local(true)
			.restrictRelay(false)
			.snapshotLocation("./src/test/resources/snapshot/playground"));

	initializeClient();
}

Example using with Switcher

Switcher switcher = getSwitcher(CLIENT_JAVA_FEATURE)
	.restrictRelay(false)
	.build();

@petruki petruki added this to the v1.6.4 milestone Jun 15, 2025
@petruki petruki self-assigned this Jun 15, 2025
@petruki petruki added the enhancement New feature or request label Jun 15, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit ae0cb71 into master Jun 15, 2025
11 checks passed
@petruki petruki deleted the staging branch June 15, 2025 03:10
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.

1 participant