api-layer icon indicating copy to clipboard operation
api-layer copied to clipboard

API Catalog /container endpoint not returning apiDoc when some metadata misses

Open taban03 opened this issue 1 year ago • 1 comments

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

taban03 avatar Oct 26 '23 14:10 taban03

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 the routes.gatewayUrl value
  • apis.swaggerUrl has to be defined and valid
  • apiVersions has to match the entry inside apis 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 the baseUrl (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.

taban03 avatar Jan 08 '24 11:01 taban03