Skip to content

Commit a4b81fa

Browse files
Merge pull request #59 from advanced-rest-client/fix/servers
reverse changes
2 parents 472d291 + 537892a commit a4b81fa

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/ApiDocumentationElement.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -403,16 +403,12 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
403403
let methodId;
404404
if (selectedType === 'method') {
405405
endpointId = eid;
406-
if(this._isAsyncAPI(this.amf) && this._endpoint){
407-
endpointId = this._endpoint['@id'];
408-
}
409406
methodId = mid;
410407
} else {
411408
endpointId = mid;
412409
}
413410

414411
const servers = this._getServers({ endpointId, methodId });
415-
this._servers = this._ensureArray(servers)
416412

417413
if (!servers || !servers.length) {
418414
return null;
@@ -1185,7 +1181,7 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
11851181
}
11861182

11871183
_methodTemplate() {
1188-
const { amf, _docsModel, narrow, compatibility, _endpoint, selected, noTryIt, graph, noBottomNavigation, server, _servers } = this;
1184+
const { amf, _docsModel, narrow, compatibility, _endpoint, selected, noTryIt, graph, noBottomNavigation, server } = this;
11891185
const prev = this._computeMethodPrevious(amf, selected);
11901186
const next = this._computeMethodNext(amf, selected);
11911187

@@ -1195,7 +1191,6 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
11951191
.compatibility="${compatibility}"
11961192
.endpoint="${_endpoint}"
11971193
.server="${server}"
1198-
.servers="${_servers}"
11991194
.method="${_docsModel}"
12001195
.previous="${prev}"
12011196
.next="${next}"
@@ -1214,7 +1209,7 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
12141209
}
12151210

12161211
_inlineEndpointTemplate() {
1217-
const { amf, _docsModel, narrow, compatibility, outlined, selected, scrollTarget, redirectUri, noUrlEditor, graph, noBottomNavigation, server, _servers } = this;
1212+
const { amf, _docsModel, narrow, compatibility, outlined, selected, scrollTarget, redirectUri, noUrlEditor, graph, noBottomNavigation, server } = this;
12181213
const prev = this._computeEndpointPrevious(amf, selected, true);
12191214
const next = this._computeEndpointNext(amf, selected, true);
12201215

@@ -1225,7 +1220,6 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
12251220
.outlined="${outlined}"
12261221
.selected="${selected}"
12271222
.server="${server}"
1228-
.servers="${_servers}"
12291223
.endpoint="${_docsModel}"
12301224
.previous="${prev}"
12311225
.next="${next}"
@@ -1240,7 +1234,7 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
12401234
}
12411235

12421236
_simpleEndpointTemplate() {
1243-
const { amf, _docsModel, narrow, compatibility, selected, graph, noBottomNavigation, server, _servers } = this;
1237+
const { amf, _docsModel, narrow, compatibility, selected, graph, noBottomNavigation, server } = this;
12441238
const prev = this._computeEndpointPrevious(amf, selected);
12451239
const next = this._computeEndpointNext(amf, selected);
12461240

@@ -1249,7 +1243,6 @@ export class ApiDocumentationElement extends EventsTargetMixin(AmfHelperMixin(Li
12491243
.narrow="${narrow}"
12501244
.compatibility="${compatibility}"
12511245
.server="${server}"
1252-
.servers="${_servers}"
12531246
.selected="${selected}"
12541247
.endpoint="${_docsModel}"
12551248
.previous="${prev}"

0 commit comments

Comments
 (0)