Is there an existing issue for this?
Current Behavior
The CAP OpenAPI generator generates an OpenAPI document with OData V4 metadata but uses the /rest protocol path in the server URL, even when the service runs through the default OData V4 endpoint.
Reproduction
Example service:
@path: 'catalog'
service CatalogService {
entity Books {
key ID : Integer;
title : String;
}
}
Run:
cds compile srv --service CatalogService --to openapi
Yields:
{
"x-odata-version": "4.01",
"servers": [
{
"url": "/rest/catalog"
}
]
}
Expected Behavior
Running the command at the top should yield
{
"servers": [
{
"url": "/odata/v4/catalog"
}
]
}
to match the default behavior of CAP.
Steps To Reproduce
See current behavior
Environment
- **OS**: MacOS
- **Node**: 24.18.0
- **npm**: using yarn
- **@cap-js/openapi**: 1.5.0
- **cds**: 9.9.3
- **cds-dki**: 9.9.4
Repository Containing a Minimal Reproducible Example
No response
Anything else?
No response
Is there an existing issue for this?
Current Behavior
The CAP OpenAPI generator generates an OpenAPI document with OData V4 metadata but uses the
/restprotocol path in the server URL, even when the service runs through the default OData V4 endpoint.Reproduction
Example service:
Run:
cds compile srv --service CatalogService --to openapiYields:
Expected Behavior
Running the command at the top should yield
to match the default behavior of CAP.
Steps To Reproduce
See current behavior
Environment
Repository Containing a Minimal Reproducible Example
No response
Anything else?
No response