Repository navigation
deprecate-auto-endpoint: add ScaniiTarget type, deprecate AUTO default - #4
Merged
Merged
Conversation
Introduces `ScaniiTarget` type with regional constructors (us1, eu1, eu2, ap1, ap2, ca1) and from_url for custom URLs. Adds a `target()` builder method as the preferred way to set the API endpoint. The raw `endpoint()` builder method is marked `#[deprecated]`. Building without either `.target()` or `.endpoint()` emits a runtime stderr warning that the AUTO fallback will be removed in a future major version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Missed the endpoint() call in process_from_url test and the quickstart example when replacing the deprecated .endpoint() API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
ScaniiTargettype with regional constructors:us1(),eu1(),eu2(),ap1(),ap2(),ca1(), andfrom_url()for custom URLsScaniiClientBuilder::target(ScaniiTarget)builder method — preferred way to set the endpointScaniiClientBuilder::endpoint(String)marked#[deprecated(since = "1.3.0")].target()or.endpoint()emits a runtimeeprintln!warning pointing to the regional constructors.endpoint(endpoint())to.target(test_target())1.2.0→1.3.0Canary context
This is the canary PR for uvasoftware/sdks#1. Java locked the annotation convention (PR scanii/scanii-java#112). The remaining 5 SDKs fan out after this is reviewed.
Design note: associated functions vs constants
Rust
constfields requireCopytypes —Stringdoesn't qualify. Used associated functions (ScaniiTarget::us1()) rather than constants (ScaniiTarget::US1) to avoid&'static str-vs-Stringcomplexity. This is idiomatic Rust; Go uses vars (TargetUS1), Java/Python/dotnet use static fields (ScaniiTarget.US1/ScaniiTarget.US1/ScaniiTarget.Auto).🤖 Generated with Claude Code