From 537892ad4622b8043baf4c694d61a314d61be1cb Mon Sep 17 00:00:00 2001 From: leandrogilcarrano Date: Mon, 6 May 2024 12:32:37 -0300 Subject: [PATCH] reverse changes --- src/ApiDocumentationElement.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ApiDocumentationElement.js b/src/ApiDocumentationElement.js index 19b8a43..16c2b8d 100644 --- a/src/ApiDocumentationElement.js +++ b/src/ApiDocumentationElement.js @@ -403,16 +403,12 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li let methodId; if (selectedType === 'method') { endpointId = eid; - if(this._isAsyncAPI(this.amf) && this._endpoint){ - endpointId = this._endpoint['@id']; - } methodId = mid; } else { endpointId = mid; } const servers = this._getServers({ endpointId, methodId }); - this._servers = this._ensureArray(servers) if (!servers || !servers.length) { return null; @@ -1185,7 +1181,7 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li } _methodTemplate() { - const { amf, _docsModel, narrow, compatibility, _endpoint, selected, noTryIt, graph, noBottomNavigation, server, _servers } = this; + const { amf, _docsModel, narrow, compatibility, _endpoint, selected, noTryIt, graph, noBottomNavigation, server } = this; const prev = this._computeMethodPrevious(amf, selected); const next = this._computeMethodNext(amf, selected); @@ -1195,7 +1191,6 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li .compatibility="${compatibility}" .endpoint="${_endpoint}" .server="${server}" - .servers="${_servers}" .method="${_docsModel}" .previous="${prev}" .next="${next}" @@ -1214,7 +1209,7 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li } _inlineEndpointTemplate() { - const { amf, _docsModel, narrow, compatibility, outlined, selected, scrollTarget, redirectUri, noUrlEditor, graph, noBottomNavigation, server, _servers } = this; + const { amf, _docsModel, narrow, compatibility, outlined, selected, scrollTarget, redirectUri, noUrlEditor, graph, noBottomNavigation, server } = this; const prev = this._computeEndpointPrevious(amf, selected, true); const next = this._computeEndpointNext(amf, selected, true); @@ -1225,7 +1220,6 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li .outlined="${outlined}" .selected="${selected}" .server="${server}" - .servers="${_servers}" .endpoint="${_docsModel}" .previous="${prev}" .next="${next}" @@ -1240,7 +1234,7 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li } _simpleEndpointTemplate() { - const { amf, _docsModel, narrow, compatibility, selected, graph, noBottomNavigation, server, _servers } = this; + const { amf, _docsModel, narrow, compatibility, selected, graph, noBottomNavigation, server } = this; const prev = this._computeEndpointPrevious(amf, selected); const next = this._computeEndpointNext(amf, selected); @@ -1249,7 +1243,6 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li .narrow="${narrow}" .compatibility="${compatibility}" .server="${server}" - .servers="${_servers}" .selected="${selected}" .endpoint="${_docsModel}" .previous="${prev}"