Skip to content

feat(adk): add RAP object kinds (BDEF, CDSView, CDSEntity)#96

Open
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
convoy/rap-support-implementation/6860be0c/gt/toast/2e0a9df0
Open

feat(adk): add RAP object kinds (BDEF, CDSView, CDSEntity)#96
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
convoy/rap-support-implementation/6860be0c/gt/toast/2e0a9df0

Conversation

@kilo-code-bot
Copy link
Copy Markdown

@kilo-code-bot kilo-code-bot bot commented Apr 5, 2026

Summary

Added RAP (ABAP RESTful Application Programming Model) object kinds to the @abapify/adk package:

  • BehaviourDefinition (BDEF): RAP behaviour definitions for CDS entities
  • CDSView (DDLS): CDS View definitions
  • CDSEntity (DDLX): CDS Metadata Extensions

Changes

  • Created AdkBehaviourDefinition, AdkCDSView, and AdkCDSEntity model classes
  • Updated kinds.ts with new kind constants and AdkObjectForKind mappings
  • Added proper exports to index.ts

Files

  • packages/adk/src/objects/rap/bdef/bdef.model.ts
  • packages/adk/src/objects/rap/cds/cds-view.model.ts
  • packages/adk/src/objects/rap/cds/cds-entity.model.ts
  • packages/adk/src/objects/rap/cds/index.ts
  • packages/adk/src/objects/rap/index.ts
  • packages/adk/src/base/kinds.ts
  • packages/adk/src/index.ts

Notes

  • Follows existing patterns from ddic/repository modules
  • Contracts (adt.rap.behaviours, adt.ddl.ddls, adt.ddl.ddlx) will be added in subsequent tasks

Open with Devin

- Add BehaviourDefinition, CDSView, CDSEntity kinds to kinds.ts
- Create BehaviourDefinition model for RAP behaviour definitions (BDEF)
- Create CDSView model for CDS views (DDLS)
- Create CDSEntity model for CDS metadata extensions (DDLX)
- Update main index.ts to export new RAP types and classes
- Follow existing object patterns from ddic/repository modules
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 5, 2026

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Apr 5, 2026

View your CI Pipeline Execution ↗ for commit 82c0f13

Command Status Duration Result
nx affected -t lint test build e2e-ci --verbose... ✅ Succeeded 16s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-05 06:49:43 UTC

@kilo-code-bot
Copy link
Copy Markdown
Author

kilo-code-bot bot commented Apr 5, 2026

Code Review Summary

Status: 1 Critical Issue | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
packages/adk/src/objects/rap/bdef/bdef.model.ts 60 this.ctx.client.adt.rap.behaviours does not exist in adt-client
packages/adk/src/objects/rap/cds/cds-view.model.ts 65 this.ctx.client.adt.ddl.ddls does not exist in adt-client
packages/adk/src/objects/rap/cds/cds-entity.model.ts 60 this.ctx.client.adt.ddl.ddlx does not exist in adt-client
Other Observations

The RAP contract endpoints referenced in the CRUD operations (adt.rap.behaviours, adt.ddl.ddls, adt.ddl.ddlx) do not exist in the adt-client package. These must be added to adt-client before these ADK objects can function. The PR description acknowledges this: "Contracts (adt.rap.behaviours, adt.ddl.ddls, adt.ddl.ddlx) will be added in subsequent tasks."

This is a known limitation but represents a CRITICAL gap since the code references non-existent properties.

Files Reviewed (7 files)
  • packages/adk/src/base/kinds.ts
  • packages/adk/src/index.ts
  • packages/adk/src/objects/rap/bdef/bdef.model.ts
  • packages/adk/src/objects/rap/cds/cds-view.model.ts
  • packages/adk/src/objects/rap/cds/cds-entity.model.ts
  • packages/adk/src/objects/rap/cds/index.ts
  • packages/adk/src/objects/rap/index.ts

Fix these issues in Kilo Cloud


Reviewed by minimax-m2.5-20260211 · 417,882 tokens

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 6 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment on lines +51 to +53
get objectUri(): string {
return `/sap/bc/adt/rap/behaviours/${encodeURIComponent(this.name)}`;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Missing .toLowerCase() in objectUri breaks consistency with codebase pattern and registry

Every existing non-DEVC model uses .toLowerCase() in its objectUri getter (e.g., clas.model.ts:43, intf.model.ts:42, doma.model.ts:37, tabl.model.ts:41). The only exception is AdkPackage which explicitly registers with nameTransform: 'preserve' at devc.model.ts:350. AdkBehaviourDefinition omits .toLowerCase() but does NOT register with nameTransform: 'preserve', creating a mismatch: getObjectUri('BDEF', 'Z_BDEF') (from the registry at base/registry.ts:218-221) returns /sap/bc/adt/rap/behaviours/z_bdef (lowercased), while new AdkBehaviourDefinition(ctx, 'Z_BDEF').objectUri returns /sap/bc/adt/rap/behaviours/Z_BDEF (not lowercased). Since objectUri is used for lock, save, and source operations in base/model.ts, this inconsistency can cause operations to target different URIs than expected.

Suggested change
get objectUri(): string {
return `/sap/bc/adt/rap/behaviours/${encodeURIComponent(this.name)}`;
}
get objectUri(): string {
return `/sap/bc/adt/rap/behaviours/${encodeURIComponent(this.name.toLowerCase())}`;
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +56 to +58
get objectUri(): string {
return `/sap/bc/adt/ddl/ddls/${encodeURIComponent(this.name)}`;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Missing .toLowerCase() in objectUri breaks consistency with codebase pattern and registry

Same issue as with AdkBehaviourDefinition: AdkCDSView.objectUri omits .toLowerCase() but the registration at cds-view.model.ts:75 doesn't set nameTransform: 'preserve'. This causes getObjectUri('DDLS', name) (from base/registry.ts:218-221) and new AdkCDSView(ctx, name).objectUri to produce different URIs when the name contains uppercase characters, which is the standard for ABAP object names.

Suggested change
get objectUri(): string {
return `/sap/bc/adt/ddl/ddls/${encodeURIComponent(this.name)}`;
}
get objectUri(): string {
return `/sap/bc/adt/ddl/ddls/${encodeURIComponent(this.name.toLowerCase())}`;
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +51 to +53
get objectUri(): string {
return `/sap/bc/adt/ddl/ddlx/${encodeURIComponent(this.name)}`;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Missing .toLowerCase() in objectUri breaks consistency with codebase pattern and registry

Same issue as the other two RAP models: AdkCDSEntity.objectUri omits .toLowerCase() but the registration at cds-entity.model.ts:70 doesn't set nameTransform: 'preserve'. This creates inconsistency between the class objectUri and the registry's getObjectUri function, which defaults to lowercase (base/registry.ts:218-221).

Suggested change
get objectUri(): string {
return `/sap/bc/adt/ddl/ddlx/${encodeURIComponent(this.name)}`;
}
get objectUri(): string {
return `/sap/bc/adt/ddl/ddlx/${encodeURIComponent(this.name.toLowerCase())}`;
}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +59 to +61
protected override get crudContract(): any {
return this.ctx.client.adt.rap.behaviours;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 crudContract references non-existent client.adt.rap.behaviours path — runtime TypeError

The crudContract getter returns this.ctx.client.adt.rap.behaviours, but there is no rap namespace in the ADT contracts (packages/adt-contracts/src/adt/ only has: atc, aunit, core, cts, ddic, discovery, functions, oo, packages, programs, repository, system). At runtime, this.ctx.client.adt.rap evaluates to undefined, so accessing .behaviours throws TypeError: Cannot read properties of undefined. This crashes load(), save(), and the static get() factory method. The any return type on crudContract masks this from the type checker.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +64 to +66
protected override get crudContract(): any {
return this.ctx.client.adt.ddl.ddls;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 crudContract references non-existent client.adt.ddl.ddls path — runtime TypeError

The crudContract getter returns this.ctx.client.adt.ddl.ddls, but there is no ddl namespace in the ADT contracts (packages/adt-contracts/src/adt/ only has: atc, aunit, core, cts, ddic, discovery, functions, oo, packages, programs, repository, system). At runtime, this.ctx.client.adt.ddl evaluates to undefined, so accessing .ddls throws TypeError: Cannot read properties of undefined. This crashes load(), save(), and the static get() factory method.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +59 to +61
protected override get crudContract(): any {
return this.ctx.client.adt.ddl.ddlx;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 crudContract references non-existent client.adt.ddl.ddlx path — runtime TypeError

The crudContract getter returns this.ctx.client.adt.ddl.ddlx, but there is no ddl namespace in the ADT contracts (packages/adt-contracts/src/adt/ only has: atc, aunit, core, cts, ddic, discovery, functions, oo, packages, programs, repository, system). At runtime, this.ctx.client.adt.ddl evaluates to undefined, so accessing .ddlx throws TypeError: Cannot read properties of undefined. This crashes load(), save(), and the static get() factory method.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

0 participants