Skip to content

fix(adms): align all action paths with com.sap.adm.{Service} namespace#184

Open
adwitiyasushant wants to merge 2 commits into
SAP:mainfrom
adwitiyasushant:contrib/adms-wire-format-alignment
Open

fix(adms): align all action paths with com.sap.adm.{Service} namespace#184
adwitiyasushant wants to merge 2 commits into
SAP:mainfrom
adwitiyasushant:contrib/adms-wire-format-alignment

Conversation

@adwitiyasushant

Copy link
Copy Markdown
Contributor

Mirrors cloud-sdk-java contrib-java/adms commit e5dd1da's wire-format audit. The Java audit identified 12 fixes against the canonical CDS sources + live ADMS tenant. Cross-verified Python state vs CDS:

  • 7 fixes were already correct in Python (UpdateDocumentInput fields, RestoreContentVersion envelope, DeleteContentVersion body shape, DownloadDocument GET function, StartJob payload, JobStatus function, LateHostBusinessObjectNodeID casing).
  • 5 namespace-prefix fixes were genuinely missing (lock, unlock, complete_multipart_upload, generate_upload_urls, mark_default) — Python used the short form which CAP accepts leniently but is not the canonical OData V4 wire format.

For cross-SDK consistency with Java, ALL 12 bound/unbound action paths now use the fully-qualified com.sap.adm.{DocumentService,AdminService, ConfigurationService}.X form:

DocumentService bound actions on DocumentRelation:
UpdateDocument, CompleteMultipartUpload,
RestoreDocumentContentVersion, DeleteDocumentContentVersion,
LockDocumentAndRelation, UnlockDocumentAndRelation,
GenerateDocumentUploadURLs, DownloadDocument (function)

DocumentService unbound:
StartJob, JobStatus (function)

AdminService unbound:
StartJob, JobStatus (function)

ConfigurationService bound on DocumentTypeBusinessObjectTypeMap:
markDefault

Test changes:

  • Tightened 7 substring assertions in test_client.py to include the namespace prefix so the wire contract is captured in tests.

Also includes prior work on this branch:

  • extra_headers support on sync + async HTTP verbs (for x-subaccount-id header on ApplicationTenant operations)
  • subaccount_id parameter on all 4 ApplicationTenant config methods

No API surface changes, no model changes, no behavioural changes — purely wire-protocol alignment with Java commit e5dd1da.

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

Provide a clear description of your changes here.

Related Issue

Closes #<issue_number>

(Link to the GitHub issue this PR addresses)

Type of Change

Please check the relevant option:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

Describe how reviewers can test your changes:

  1. Step 1
  2. Step 2
  3. Expected result

Checklist

Before submitting your PR, please review and check the following:

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

If this PR introduces breaking changes, please describe:

  • What breaks
  • Migration path for users
  • Alternative approaches considered

Additional Notes

Add any additional context, screenshots, or information that would help reviewers.

Mirrors cloud-sdk-java contrib-java/adms commit e5dd1da's wire-format
audit. The Java audit identified 12 fixes against the canonical CDS
sources + live ADMS tenant. Cross-verified Python state vs CDS:

  - 7 fixes were already correct in Python (UpdateDocumentInput fields,
    RestoreContentVersion envelope, DeleteContentVersion body shape,
    DownloadDocument GET function, StartJob payload, JobStatus function,
    LateHostBusinessObjectNodeID casing).
  - 5 namespace-prefix fixes were genuinely missing (lock, unlock,
    complete_multipart_upload, generate_upload_urls, mark_default) —
    Python used the short form which CAP accepts leniently but is not
    the canonical OData V4 wire format.

For cross-SDK consistency with Java, ALL 12 bound/unbound action paths
now use the fully-qualified com.sap.adm.{DocumentService,AdminService,
ConfigurationService}.X form:

  DocumentService bound actions on DocumentRelation:
    UpdateDocument, CompleteMultipartUpload,
    RestoreDocumentContentVersion, DeleteDocumentContentVersion,
    LockDocumentAndRelation, UnlockDocumentAndRelation,
    GenerateDocumentUploadURLs, DownloadDocument (function)

  DocumentService unbound:
    StartJob, JobStatus (function)

  AdminService unbound:
    StartJob, JobStatus (function)

  ConfigurationService bound on DocumentTypeBusinessObjectTypeMap:
    markDefault

Test changes:
  - Tightened 7 substring assertions in test_client.py to include the
    namespace prefix so the wire contract is captured in tests.

Also includes prior work on this branch:
  - extra_headers support on sync + async HTTP verbs (for x-subaccount-id
    header on ApplicationTenant operations)
  - subaccount_id parameter on all 4 ApplicationTenant config methods

No API surface changes, no model changes, no behavioural changes —
purely wire-protocol alignment with Java commit e5dd1da.
@adwitiyasushant adwitiyasushant requested a review from a team as a code owner June 24, 2026 05:25
Interactive CLI for testing all ADMS APIs against a real ADM instance.
Used during this PR's development to verify each of the 12 wire-format
fixes returns the expected response from the live tenant.

WILL BE REMOVED BEFORE MERGE — kept in this PR only as a debugging aid
so reviewers can reproduce the live-tenant verification if desired.

Usage:
  set -a && source .env.adms && set +a
  .venv/bin/python scripts/adms_cli.py
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.

1 participant