Skip to content

chore: working sample without cap-js#89

Open
Schmarvinius wants to merge 1 commit into
mainfrom
chore/sample-adaption
Open

chore: working sample without cap-js#89
Schmarvinius wants to merge 1 commit into
mainfrom
chore/sample-adaption

Conversation

@Schmarvinius

@Schmarvinius Schmarvinius commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Remove @cap-js/ai Dependency from Bookshop Sample

Refactor

♻️ Refactored the bookshop sample to eliminate the @cap-js/ai Node.js package dependency, replacing its auto-generated compile-time enhancements with manual CDS model definitions.

Changes

  • samples/bookshop/.cdsrc.json: Removed the AICore service model reference pointing to @cap-js/ai/srv/AICoreService and the cdsc.moduleLookupDirectories configuration block.
  • samples/bookshop/package.json: Removed @cap-js/ai from the dependencies section.
  • samples/bookshop/package-lock.json: Removed the @cap-js/ai package entry and its resolved metadata.
  • samples/bookshop/pom.xml: Removed the cds-feature-recommendations Maven dependency from the dependency management section.
  • samples/bookshop/srv/pom.xml: Removed the cds-feature-recommendations Maven dependency from the service module.
  • samples/bookshop/srv/ai-core-service.cds: Updated the AICore import source from @cap-js/ai/srv/AICoreService to com.sap.cds/ai.
  • samples/bookshop/srv/recommendations.cds (new): Added a manually defined CDS model that replicates the recommendations structure previously auto-generated by the @cap-js/ai plugin. This includes the Books_Recommendations virtual entity with fields for genre_ID and currency_code, a navigation property extension on AdminService.Books, and the @UI.Recommendations annotation.
  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.26.0

  • Summary Prompt: Default Prompt
  • Event Trigger: pull_request.opened
  • File Content Strategy: Full file content
  • Correlation ID: ebd21fad-ab7e-44fd-93d4-6d77b437393e
  • LLM: anthropic--claude-4.6-sonnet
  • Output Template: Default Template

@Schmarvinius Schmarvinius requested a review from a team as a code owner June 19, 2026 07:35

@hyperspace-insights hyperspace-insights Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR removes the @cap-js/ai Node.js dependency and cds-feature-recommendations Java artifact, replacing them with a manually-maintained recommendations.cds model and a new com.sap.cds/ai import path. There are two correctness issues in the new recommendations.cds that need attention: the association on condition and the non-standard @UI.Recommendations annotation — please verify both compile and produce the expected Fiori Elements behavior before merging.

PR Bot Information

Version: 1.26.0

  • LLM: anthropic--claude-4.6-sonnet
  • Event Trigger: pull_request.opened
  • File Content Strategy: Full file content
  • Correlation ID: ebd21fad-ab7e-44fd-93d4-6d77b437393e

Comment thread samples/bookshop/srv/recommendations.cds
Comment thread samples/bookshop/srv/recommendations.cds
Comment thread samples/bookshop/package-lock.json
@Schmarvinius

Schmarvinius commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@lisajulia do we want to provide two separate solutions, or provide the non cap-js/ai solution and tell the people that if they want automatic registration they have to use cap-js/ai and can skip the part that is in recommendations.cds
I'd go with the 2nd approach

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