We are a CAP Java project using cds-feature-ord to enable ORD. UCL crawls our ORD endpoints as part of its discovery flow, and we encountered the following issues during integration.
Issue 1: perspective field missing from well-known endpoint response
The /.well-known/open-resource-discovery response does not include the perspective field, even when configured in .cdsrc.json.
Actual:
{
"openResourceDiscoveryV1": {
"documents": [{
"url": "/ord/v1/documents/ord-document",
"accessStrategies": [{ "type": "open" }]
}]
}
}
Looking at WellKnownServlet.createOrdDocument(), the OrdDocument model has no getPerspective() and the map passed to OrdDocument.of() never includes perspective, so the config value is silently ignored.
UCL requires perspective to be present — its absence causes discovery to fail.
Issue 2: Empty Local-Tenant-Id header triggers Dynamic provider instead of Static
When UCL crawls /ord/v1/documents/ord-document, it sends Local-Tenant-Id: (empty string). DocumentsServlet passes this directly to systemUser(request.getHeader("Local-Tenant-Id")), which receives "" instead of null.
useStaticModel() evaluates correctly — tenant is null — but systemUser("") does not behave the same as systemUser(null), causing the Dynamic provider to invoke the MTX sidecar instead of serving static resources, which fails in this context.
Issue 3: perspective should be dynamic based on whether Static or Dynamic provider serves the request
We use @cap-js/ord in the MTX sidecar to serve dynamic ORD for tenant-extended models. The sidecar sets perspective: system-instance, which is correct for dynamic ORD. However, the static provider should return perspective: system-version.
Since cds-feature-ord does not include perspective in the well-known response at all (Issue 1), we worked around it with a custom controller that hardcodes perspective: system-version. This breaks the dynamic case — when UCL sends a request that routes to the sidecar, the well-known endpoint still advertises system-version, which is incorrect.
Ideally, perspective in the well-known response should reflect whether the request will be served statically (system-version) or dynamically (system-instance), or the library should expose a way to configure this per-request.
Version: cds-feature-ord 4.9.4
We are a CAP Java project using
cds-feature-ordto enable ORD. UCL crawls our ORD endpoints as part of its discovery flow, and we encountered the following issues during integration.Issue 1:
perspectivefield missing from well-known endpoint responseThe
/.well-known/open-resource-discoveryresponse does not include theperspectivefield, even when configured in.cdsrc.json.Actual:
{ "openResourceDiscoveryV1": { "documents": [{ "url": "/ord/v1/documents/ord-document", "accessStrategies": [{ "type": "open" }] }] } }Looking at
WellKnownServlet.createOrdDocument(), theOrdDocumentmodel has nogetPerspective()and the map passed toOrdDocument.of()never includesperspective, so the config value is silently ignored.UCL requires
perspectiveto be present — its absence causes discovery to fail.Issue 2: Empty
Local-Tenant-Idheader triggers Dynamic provider instead of StaticWhen UCL crawls
/ord/v1/documents/ord-document, it sendsLocal-Tenant-Id:(empty string).DocumentsServletpasses this directly tosystemUser(request.getHeader("Local-Tenant-Id")), which receives""instead ofnull.useStaticModel()evaluates correctly — tenant is null — butsystemUser("")does not behave the same assystemUser(null), causing the Dynamic provider to invoke the MTX sidecar instead of serving static resources, which fails in this context.Issue 3:
perspectiveshould be dynamic based on whether Static or Dynamic provider serves the requestWe use
@cap-js/ordin the MTX sidecar to serve dynamic ORD for tenant-extended models. The sidecar setsperspective: system-instance, which is correct for dynamic ORD. However, the static provider should returnperspective: system-version.Since
cds-feature-orddoes not includeperspectivein the well-known response at all (Issue 1), we worked around it with a custom controller that hardcodesperspective: system-version. This breaks the dynamic case — when UCL sends a request that routes to the sidecar, the well-known endpoint still advertisessystem-version, which is incorrect.Ideally,
perspectivein the well-known response should reflect whether the request will be served statically (system-version) or dynamically (system-instance), or the library should expose a way to configure this per-request.Version:
cds-feature-ord4.9.4