Skip to content

Commit

Permalink
Merge pull request #88 from advanced-rest-client/fix/W-15607557/serve…
Browse files Browse the repository at this point in the history
…r-name

Fix/w 15607557/server name
  • Loading branch information
leandrogilcarrano authored May 6, 2024
2 parents f954f37 + 9c9af40 commit b1919a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 48 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@api-components/api-method-documentation",
"description": "A HTTP method documentation build from AMF model",
"version": "5.2.22",
"version": "5.2.23",
"license": "Apache-2.0",
"main": "index.js",
"module": "index.js",
Expand Down
30 changes: 2 additions & 28 deletions src/ApiMethodDocumentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
* Bindings for the type document.
* This is a map of the type name to the binding name.
*/
bindings: {type: Array},
/**
* Adds a servers to async API
*
* @param {string} url - The URL of the server.
* @param {object} [description] - An object containing a string `description` property.
*/
servers: {type:Array},
_servers: {type:Array},
bindings: {type: Array}
};
}

Expand Down Expand Up @@ -343,21 +335,6 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
this._processServerInfo();
}

get servers() {
return this._servers;
}

set servers(value) {

const old = this._servers;
/* istanbul ignore if */
if (old === value) {
return;
}
this._servers = value;
this.requestUpdate('servers', old);
}

get _titleHidden() {
if (!this.noTryIt) {
return false;
Expand Down Expand Up @@ -920,7 +897,6 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
<api-url
.amf="${this.amf}"
.server="${this.server}"
.servers="${this.servers}"
.endpoint="${this.endpoint}"
.apiVersion="${this.apiVersion}"
.baseUri="${this.baseUri}"
Expand Down Expand Up @@ -1248,8 +1224,7 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
const {
amf,
compatibility,
graph,
servers
graph
} = this;
return html`
<div class="callback-section">
Expand All @@ -1258,7 +1233,6 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
.amf="${amf}"
.method="${method}"
.endpoint="${endpoint}"
.servers="${servers}"
?compatibility="${compatibility}"
?graph="${graph}"
noTryit
Expand Down
21 changes: 4 additions & 17 deletions src/ApiUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
* Optional, operation id that is render only for async api
*/
operationId:{type: String},
/**
* Adds a servers to async API
*
* @param {string} url - The URL of the server.
* @param {object} [description] - An object containing a string `description` property.
*/
servers: {type:Array},
_servers: {type:Array},
_url: { type: String },
_method: { type: String },
_protocol: { type: String },
Expand Down Expand Up @@ -126,16 +118,11 @@ export class ApiUrl extends AmfHelperMixin(LitElement) {
}

get servers() {
return this._servers;
}

set servers(value) {
const old = this._servers;
if (old === value) {
return;
let endpointId
if(this.endpoint){
endpointId = this.endpoint["@id"]
}
this._servers = value;
this.requestUpdate('servers', old);
return this._getServers({ endpointId });
}

get endpoint() {
Expand Down

0 comments on commit b1919a1

Please sign in to comment.