Skip to content

MOBILE-258: Allow path prefix for operaionsDomain#740

Merged
enotniy merged 1 commit into
developfrom
feature/MOBILE-258
Jul 23, 2026
Merged

MOBILE-258: Allow path prefix for operaionsDomain#740
enotniy merged 1 commit into
developfrom
feature/MOBILE-258

Conversation

@enotniy

@enotniy enotniy commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables operationsDomain to include an optional path prefix (e.g. domain.com/api/v2) so operation endpoints are appended after that prefix, while keeping strict validation (no query/fragment/empty path segments).

Changes:

  • Added SdkValidation.isValidOperationsDomain() (host + optional path prefix) and switched configuration/policy validation to use it.
  • Updated toBaseUrl/gateway URL-building test coverage to ensure path prefixes are preserved and no double slashes occur.
  • Documented the new operationsDomain behavior in MindboxConfiguration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/src/test/java/cloud/mindbox/mobile_sdk/SdkValidationDomainTest.kt Adds tests for toBaseUrl path-prefix behavior and new operations-domain validation cases.
sdk/src/test/java/cloud/mindbox/mobile_sdk/managers/GatewayManagerTest.kt Verifies operations URLs append endpoints after a configured path prefix (and avoid //).
sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/data/repositories/OperationsDomainConfigPolicyTest.kt Updates mocks/tests to validate and store operations domains that may include a path prefix.
sdk/src/main/java/cloud/mindbox/mobile_sdk/SdkValidation.kt Introduces isValidOperationsDomain() and uses it in configuration validation.
sdk/src/main/java/cloud/mindbox/mobile_sdk/MindboxConfiguration.kt Updates operationsDomain builder documentation to explicitly allow a path prefix.
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/data/repositories/OperationsDomainConfigPolicy.kt Switches policy validation from isValidDomain to isValidOperationsDomain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/src/main/java/cloud/mindbox/mobile_sdk/SdkValidation.kt
Comment thread sdk/src/main/java/cloud/mindbox/mobile_sdk/SdkValidation.kt Outdated
@enotniy
enotniy force-pushed the feature/MOBILE-258 branch from b40a824 to 29a93c1 Compare July 23, 2026 11:50
@enotniy
enotniy merged commit 7b90424 into develop Jul 23, 2026
7 checks passed
@enotniy
enotniy deleted the feature/MOBILE-258 branch July 23, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants