[Part - 1] Enrich CAP based Services with Behaviors using Annotations
Walks through CDS annotations that add behaviour beyond CRUD: @readonly and @insertonly take away write, update or delete on an entity or element, each shown with the OData metadata it generates. @mandatory, @assert.unique, @assert.integrity, @assert.format and @assert.range then enforce input checks that @sap/cds@sap/cdsThe CAP Node.js runtime, which compiles the CDS model, serves the services declared in it, answers generic requests before any handler runs, and loads every cds-plugin.sap official, cap runs on write, with the SQL or HANA constraint @assert.unique compiles to and the error code each rejection returns. It names @restrict and @requires but defers them, calling authorization too large a topic for this post.
Where it sits
Who is behind it
In the atlas: contributes to 1, wrote 3@AjitKP91author
Before you read it
ApplicabilityCore changedInput validation changed in @sap/cds 8.5.0, 2024-11-26.
This is a derived prompt to re-check the work, not a claim that the work is wrong. Exact stale statements are recorded separately after editorial review.
Properties
About this work
For input-validation
For authorization
Details
Graph
Source
History
- explains → applies_to on capability:input-validation (cap); capability:authorization (cap)Door scope proposed from the title and summary, so a door page lists the piece only where it holds (docs/concepts/content-on-doors.md).
- Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
- Ref
content:part-1-enrich-cap-based-services-with-behaviors-using-annotations- JSON
- /content/part-1-enrich-cap-based-services-with-behaviors-using-annotations.json
- MCP
- Connecting an agent