Skip to content

Commit b65e50d

Browse files
authored
Merge pull request #639 from mulesoft/feat/update-api-documentation-with-server-selector
feat(server): update api-documentation that allows server selection
2 parents 5602b8f + 6884b53 commit b65e50d

File tree

4 files changed

+41
-10
lines changed

4 files changed

+41
-10
lines changed

package-lock.json

Lines changed: 27 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
"@anypoint-web-components/anypoint-button": "^1.0.14",
3636
"@api-components/amf-helper-mixin": "^4.0.24",
3737
"@api-components/api-console-ext-comm": "^3.0.0",
38-
"@api-components/api-documentation": "^4.0.5",
38+
"@api-components/api-documentation": "^4.1.1",
3939
"@api-components/api-navigation": "^4.1.0",
40-
"@api-components/api-request-panel": "^4.0.1",
40+
"@api-components/api-request-panel": "^4.1.2",
4141
"@api-components/raml-aware": "^3.0.0",
4242
"@polymer/app-layout": "^3.1.0",
4343
"@polymer/iron-media-query": "^3.0.0",

src/ApiConsole.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,16 +293,20 @@ export class ApiConsole extends AmfHelperMixin(LitElement) {
293293
baseUri,
294294
selectedServerValue,
295295
selectedServerType,
296+
_noDocumentationServerSelector,
296297
noServerSelector,
298+
noCustomServer
297299
} = this;
300+
298301
return html`<api-documentation
299302
.amf="${amf}"
300303
.selected="${selectedShape}"
301304
.selectedType="${selectedShapeType}"
302305
?narrow="${narrow}"
303306
?compatibility="${compatibility}"
304307
?outlined="${outlined}"
305-
?noServerSelector="${noServerSelector}"
308+
?noServerSelector="${noServerSelector || _noDocumentationServerSelector}"
309+
?noCustomServer="${noCustomServer}"
306310
.inlineMethods="${inlineMethods}"
307311
.noTryIt="${_noTryItValue}"
308312
.baseUri="${baseUri}"
@@ -580,9 +584,14 @@ export class ApiConsole extends AmfHelperMixin(LitElement) {
580584
selectedServerType: { type: String },
581585
/**
582586
* Optional property to set
583-
* If true, the server selector is not rendered
587+
* If true, the server selector is not rendered in any component
584588
*/
585589
noServerSelector: { type: Boolean },
590+
/**
591+
* Optional property to set
592+
* If true, forces the api-documentation to hide the server selector
593+
*/
594+
_noDocumentationServerSelector: { type: Boolean },
586595
/**
587596
* Optional property to set
588597
* If true, the server selector custom option is not rendered

src/ApiConsoleApp.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export class ApiConsoleApp extends ApiConsole {
173173
return;
174174
}
175175
this._wideLayout = value;
176+
this._noDocumentationServerSelector = value;
176177
this._updateRenderInlineTyit();
177178
}
178179

0 commit comments

Comments
 (0)