Skip to content

Commit bfd1f1d

Browse files
committed
Enhance try-it panel visibility logic to account for gRPC APIs in ApiConsole and ApiConsoleApp
1 parent 5ce0d59 commit bfd1f1d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/ApiConsole.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@ export class ApiConsole extends AmfHelperMixin(LitElement) {
463463
const webApi = this._computeApi(amf);
464464
this.webApi = webApi;
465465
this.methodName = this._computeMethodName(this.selectedShape, webApi);
466-
if (!this._isWebAPI(amf)) {
466+
// Hide try-it panel for gRPC APIs or non-WebAPI models
467+
if (!this._isWebAPI(amf) || this._isGrpcApi(amf)) {
467468
this._noTryItValue = true;
468469
}
469470
}

src/ApiConsoleApp.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ export class ApiConsoleApp extends ApiConsole {
268268
*/
269269
async _processModelChange() {
270270
super._processModelChange();
271+
// Update try-it panel visibility based on API type (gRPC detection)
272+
this._updateRenderInlineTyit();
271273
this.apiTitle = this._computeApiTitle(this.webApi);
272274
await this.updateComplete;
273275
if (window.history.state) {

0 commit comments

Comments
 (0)