Switch from compiling Notification Types to Event Types#125
Conversation
There was a problem hiding this comment.
The PR introduces a useful feature — deriving notification types from CDS model annotations rather than requiring a hand-authored JSON file. However, there are several substantive issues: a redundant cds.load during startup that should use the already-available cds.model, a potential TypeError in resolveEnum when the channel value is not a string, a silent data loss when the struct form of @notification is used instead of flat annotation keys, and unit tests that bypass cds.reflect() and therefore do not accurately validate the production code path. Please address these before merging.
PR Bot Information
Version: 1.20.43
- File Content Strategy: Full file content
- Event Trigger:
pull_request.opened - Correlation ID:
01b9afab-28a3-4551-8db9-7abecd2e74cc - LLM:
anthropic--claude-4.6-sonnet
SummaryThe following content is AI-generated and provides a summary of the pull request: Feat: Define Notification Types via CDS Event AnnotationsNew Features✨ This pull request introduces a major enhancement allowing notification types to be defined directly within CDS models using The key improvements include:
Changes
PR Bot InformationVersion:
|
There was a problem hiding this comment.
The PR introduces a useful feature (CDS annotation-based notification type discovery) but has several correctness issues: a spurious warning in content-deployment.js when no types path is configured, incorrect environment-based branching in cds-plugin.js that conflates service kind with deployment environment, unnecessary model loading in production for non-REST setups, a hardcoded personal email in a test fixture, a typo in the README ("iori" → "Fiori"), and a unit test for content-deployment that doesn't mock the new compile module it depends on.
PR Bot Information
Version: 1.21.0
- File Content Strategy: Full file content
- LLM:
anthropic--claude-4.6-sonnet - Event Trigger:
pull_request.ready_for_review - Correlation ID:
7cb893f4-b27b-445f-9c3a-087f81f6687d
Plug-in currently builds and compiles from a user-written json file. This is slow and inefficient. Types also (automatically) will come from event types from cds files where events are annotated with @notification (json file remains backwards compatible).