feat(adk): add RAP object kinds (BDEF, CDSView, CDSEntity)#96
feat(adk): add RAP object kinds (BDEF, CDSView, CDSEntity)#96kilo-code-bot[bot] wants to merge 1 commit intomainfrom
Conversation
- 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
|
|
View your CI Pipeline Execution ↗ for commit 82c0f13
☁️ Nx Cloud last updated this comment at |
Code Review SummaryStatus: 1 Critical Issue | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Other ObservationsThe RAP contract endpoints referenced in the CRUD operations ( This is a known limitation but represents a CRITICAL gap since the code references non-existent properties. Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by minimax-m2.5-20260211 · 417,882 tokens |
| get objectUri(): string { | ||
| return `/sap/bc/adt/rap/behaviours/${encodeURIComponent(this.name)}`; | ||
| } |
There was a problem hiding this comment.
🔴 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.
| 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())}`; | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
| get objectUri(): string { | ||
| return `/sap/bc/adt/ddl/ddls/${encodeURIComponent(this.name)}`; | ||
| } |
There was a problem hiding this comment.
🔴 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.
| 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())}`; | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
| get objectUri(): string { | ||
| return `/sap/bc/adt/ddl/ddlx/${encodeURIComponent(this.name)}`; | ||
| } |
There was a problem hiding this comment.
🔴 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).
| 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())}`; | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
| protected override get crudContract(): any { | ||
| return this.ctx.client.adt.rap.behaviours; | ||
| } |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| protected override get crudContract(): any { | ||
| return this.ctx.client.adt.ddl.ddls; | ||
| } |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| protected override get crudContract(): any { | ||
| return this.ctx.client.adt.ddl.ddlx; | ||
| } |
There was a problem hiding this comment.
🔴 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.
Was this helpful? React with 👍 or 👎 to provide feedback.



Summary
Added RAP (ABAP RESTful Application Programming Model) object kinds to the @abapify/adk package:
Changes
AdkBehaviourDefinition,AdkCDSView, andAdkCDSEntitymodel classeskinds.tswith new kind constants andAdkObjectForKindmappingsindex.tsFiles
packages/adk/src/objects/rap/bdef/bdef.model.tspackages/adk/src/objects/rap/cds/cds-view.model.tspackages/adk/src/objects/rap/cds/cds-entity.model.tspackages/adk/src/objects/rap/cds/index.tspackages/adk/src/objects/rap/index.tspackages/adk/src/base/kinds.tspackages/adk/src/index.tsNotes
adt.rap.behaviours,adt.ddl.ddls,adt.ddl.ddlx) will be added in subsequent tasks