
In CAP Node.js, a relative service path and an absolute path produce different endpoints. The leading slash in @path matters.
Relative paths retain the protocol prefix
@path: 'customer'
service CustomerService {}With the default OData V4 protocol, this serves the example at /odata/v4/customer.
An absolute path starts at the root
@path: '/customer'
service CustomerService {}This serves the example at /customer, with metadata at /customer/$metadata. CAP’s current documentation warns that an absolute path prevents serving that service through multiple protocols.
Prefer the current endpoint scheme
SAP KBA 3734505 refers to the protocol-specific paths introduced with cds7. The June 2023 release notes document a historical cds.features.serve_on_root compatibility option, while recommending migration to the new scheme.
For current development, use the documented path behavior for your installed CAP version rather than assuming an older compatibility flag is a permanent solution. Update consumers and routing configuration when changing an endpoint.



