Skip to content

[Version: 3.12.1 until 3.13.1] Typo in UpdatableProperties #491

Description

@saschabrockel

Describe the bug

The Attachments aspect in @cap-js/attachments is annotated with a misspelled Capabilities term. In db/index.cds the aspect declares:

annotate Attachments with @Capabilities.UpdateRestrictions.NonUpdateableProperties : [ content ];
The property is spelled NonUpdat**ee**ableProperties, but the OData Capabilities vocabulary (Capabilities.UpdateRestrictionsType) only defines NonUpdat**a**bleProperties. Because the term is unknown, the CDS compiler ignores the annotation and emits a warning for every entity that flattens the aspect. Two consequences:

A compiler warning is raised at each projection of the aspect.
The intended restriction is silently lost — content is not actually marked as non-updatable, even though the annotation clearly intends it to be.
Compiler warning (one per exposed *_attachments entity):

[WARNING] db/schema.cds:242:3: “NonUpdateableProperties” is not a known property for
“@Capabilities.UpdateRestrictions” of type “Capabilities.UpdateRestrictionsType”
(in entity:“…_attachments”/“@Capabilities.UpdateRestrictions”)
To Reproduce

Steps to reproduce the behavior:

Add @cap-js/attachments (v3.12.1, also confirmed in latest v3.13.1) to a CAP project.
Use the Attachments aspect on an entity, e.g. attachments : Composition of many Attachments;.
Expose the entity through a service.
Run cds build (or cds compile).
Observe the “NonUpdateableProperties” is not a known property … warning for each exposed attachments entity.

Environment:

@cap-js/attachments: 3.12.1 (typo also present in 3.13.1, the current latest)
@sap/cds: 9.9.1 / @sap/cds-dk: 9.9.0
Expected behavior

The aspect should use the correct vocabulary term so that no warning is raised and content is actually marked as non-updatable:

annotate Attachments with @Capabilities.UpdateRestrictions.NonUpdatableProperties : [ content ];
[ ] is it a regression issue?
No — the misspelled term is present across all released versions up to and including the current latest (3.13.1).

Screenshots
Not applicable (compiler/CLI output included above).

Metadata

Metadata

Assignees

No one assigned

    Labels

    NewbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions