diff --git a/demo/index.js b/demo/index.js index 0cf92fc..a259bc0 100644 --- a/demo/index.js +++ b/demo/index.js @@ -28,6 +28,7 @@ class ApiDemo extends ApiDemoPage { ["APIC-641", "APIC-641"], ["W-10881270", "W-10881270"], ["async-api26", "AsyncAPI26"], + ["asyncApi-2.62", "AsyncAPI26-2"], ].map( ([file, label]) => html` ${label} diff --git a/package-lock.json b/package-lock.json index 21d2e13..77aee22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@api-components/api-summary", - "version": "4.6.7", + "version": "4.6.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9e225ab..8a2a8d1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@api-components/api-summary", "description": "A summary view for an API base on AMF data model", - "version": "4.6.7", + "version": "4.6.8", "license": "Apache-2.0", "main": "index.js", "module": "index.js", diff --git a/src/ApiSummary.js b/src/ApiSummary.js index 20df952..45252e2 100644 --- a/src/ApiSummary.js +++ b/src/ApiSummary.js @@ -396,11 +396,11 @@ export class ApiSummary extends AmfHelperMixin(LitElement) { * whether it's defined in the main API definition or not. */ _serversTemplate() { - const { servers } = this; + const { servers, amf } = this; if (!servers || !servers.length) { return ""; } - if (servers.length === 1) { + if (servers.length === 1 && !this._isAsyncAPI(amf)) { return this._baseUriTemplate(servers[0]); } @@ -423,7 +423,8 @@ export class ApiSummary extends AmfHelperMixin(LitElement) { const description = this._computeDescription(server); const serverNameTemplate = this._serverNameTemplate(server); const serverTagsTemplate = this._serverTagsTemplate(server); - return html`
  • + const listItemClass = description ? "" : "without-description"; + return html`
  • ${serverNameTemplate} ${uri} ${serverTagsTemplate}