Shows different approaches on how to host the Swagger UI on SAP BTP inside an HTML5 repository.
All three approaches assume that a subscription of SAP Build Workzone, Standard Edition exists in the targeted subaccount. So the mta.yaml
configuration does not contain an approuter module.
Flavor 1: HTML5 with index.html and local Swagger UI distribution
The complete Swagger UI distribution is pushed to the HTML5 container and css/js files are locally referenced in the index.html
file.
The Open API specification is also contained in the deployed application.
Flavor 2: HTML5 with index.html and Swagger UI distribution from unpkg
Here the index.html
file is loading the Swagger UI css/js files from unpkg
.
Flavor 3: Local Swagger UI distribution hosted inside SAPUI5 Component
The Swagger UI is again locally hosted but this time it is wrapped in a simple SAPUI5 Component to make the inclusion in a SAP Build Workzone site via component id possible.
Here we have to specify the full path to deployed index.html
file in a custom tile configuration, to enable the inclusion in a SAP Build Workzone site. The link to the application can be taken from the HTML5 application overview on the Subaccount:
Sample URL: https://<subaccount-subdomain>.launchpad.cfapps.<region>.hana.ondemand.com/apidocs.apidocs-0.0.1/index.html
Note: The version number in the URL is optional and can be removed (i.e. -0.0.1
).