api-layer
api-layer copied to clipboard
API Catalog /container endpoint not returning apiDoc when some metadata misses
Describe the bug
/container
endpoint should be reviewed to see whether it matches the service's conformance to properly include the API documentation.
https://github.com/zowe/api-layer/wiki/Issue-management
Outcome
In many cases, the onboarded service's documentation is not displayed in the Catalog due to some issue in following configuration:
"apiVersions": [
"zowe.apiml.gateway v1.0.0"
],
"apis": {
"default": null,
"zowe.apiml.gateway v1.0.0": {
"apiId": "zowe.apiml.gateway",
"gatewayUrl": "api/v1",
"version": "1.0.0",
"swaggerUrl": "gateway-_zowe.apiml.gateway vv0_default.json",
"documentationUrl": "https://zowe.github.io/docs-site/",
"defaultApi": false
}
},
Specifically, the mandatory properties are:
-
apis.gatewayUrl
has to be defined and match theroutes.gatewayUrl
value -
apis.swaggerUrl
has to be defined and valid -
apiVersions
has to match the entry insideapis
entry -
apis.version
has to be defined and valid. It specifies the API version. This parameter is used to correctly retrieve the API documentation according to requested version of the API. - furthermore, either the
basePath
(specifies the URL prefix for all API paths, relative to the gateway host) or thebaseUrl
(specifies an absolute URL prefix that is used to access the API service via the API Gateway) must be correctly specified
It should probably be stated more clearly in the Zowe doc and maybe included in the conformance criteria document.