All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
The format is based on Keep a Changelog.
- Default texts have changed and are now more configurable through
@title
for service title@Core.Description
for service short text@Core.LongDescription
for service description
- The OpenAPI spec is no available for download on
.../openapi.json
and linked in the UI.
- The default value for option
apiPath
is now/
, allowing more flexible control over the root path where the CDS services are served. Formerly, it was not possible to set root path relative to the current host, likeabc.com/1234-appid/$api-docs/...
,abc.com/5678-appid/$api-docs/...
.
- Use
@cap-js/openapi
instead of@sap/cds-dk
, leading to lighter dependencies
- Auto-registration mode: the middleware registers itself when loaded as a CAP plugin
- Declarative configuration through
package.json
/cds-rc.json
- Programmatic registration is still possible, but disables auto mode then
- Make dependency to
@sap/cds-dk
optional. If running with thecds
executable during development, the dependency is fulfilled anyways. Only when running as part of a deployed app withcds-serve
, then such a dependency is needed.
- Requires
@sap/cds
^7 - Requires
@sap/cds-dk
^7 - Requires
swagger-ui-express
/swagger-ui
^5 - Drops Node 14 and 16 support. Minimum Node version is now 18.
- New option
odataVersion
to specify the OData version used to compile the OpenAPI specs
- Works with
@sap/cds
7.4 again
- Way to pass swagger (UI) options. See README.md.
- JSDoc type definitions for options.
- The default site title is now <Service Name> - Swagger UI (instead of just Swagger UI)
- REST services are now available as well in the Swagger UI. Previously, only OData services were allowed. This was to avoid potential issues as the underlying OpenAPI transformation uses OData as intermediate protocol. So, as long as we don't see issues, allow REST services as well.
- Multiple services are now properly served, w/o the previous stale content of
swagger-ui-init.js
. Requiresswagger-ui-express
>= 4.6.2
- Option
apiPath
to configure a root URL path for the services, which is useful if behind a reverse proxy.
- The Preview text on index page has been added to accomodate the change in
@sap/cds-dk
4.9.0 that removes that text suffix. - Require
@sap/cds-dk@^4.9.0
- The
serving Swagger UI...
log lines are not longer sent to console by default to avoid clutter in the default output. They can be enabled withDEBUG=swagger
set as environment variable.
- Requires
@sap/cds-dk
4.3.0, no more polyfill for older versions
- Options can be provided partially
- Readme, sample code
Initial release