Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(executeATCCheck): correctly escape namespaces #5275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mzimnn
Copy link

@mzimnn mzimnn commented Feb 18, 2025

Description

The ATC check failed when the name of a development object included a namespace. Prior to this change, the generated request body looked like this:

  ...
  <adtcore:objectReferences>
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main" />
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/oo/interfaces//ABC/MY_INTERFACE" />
  </adtcore:objectReferences>
  ...

Due to the unescaped slashes in the namespace, the SAP system failed with a 400 Bad Request error:

URI-Mapping cannot be performed due to invalid URI: /sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main

By ensuring the namespaces are properly escaped (e.g. %2FABC%2FMY_TABLE) for all object types, the ATC check now works as expected. However, for classes this issue was already fixed in commit 4ff5271 (gCTSExecuteABAPQualityCheck_namespace_objects (#4623), 2023-10-11).

Checklist

  • Tests
  • Documentation
  • Inner source library needs updating

The ATC check failed when the name of a development object included a
namespace. Prior to this change, the generated request body looked like
this:

  ...
  <adtcore:objectReferences>
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main" />
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/oo/interfaces//ABC/MY_INTERFACE" />
  </adtcore:objectReferences>
  ...

Due to the unescaped slashes in the namespace, the SAP system failed
with a 400 Bad Request error:

  URI-Mapping cannot be performed due to invalid URI:
  /sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main

By ensuring the namespaces are properly escaped (e.g. %2FABC%2FMY_TABLE)
for all object types, the ATC check now works as expected. However, for
classes this issue was already fixed in commit 4ff5271
(gCTSExecuteABAPQualityCheck_namespace_objects (SAP#4623), 2023-10-11).
@mzimnn mzimnn requested a review from a team as a code owner February 18, 2025 14:30
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