@W-21176653 Move gRPC API detection and try panel hiding logic to ApiConsoleApp #890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Moves gRPC API detection and try-it panel hiding logic from
ApiConsole.jstoApiConsoleApp.jswhile maintaining the functionality in both components. Also adds missing test coverage for gRPC detection inApiConsole.js.This PR is part of a two-part fix:
api-console-app(work started by Lean but not published)api-documentationto hide the try-it button when dealing with a gRPC APIChanges
_isGrpcApi()) check inApiConsole._processModelChange()to hide try-it panel for gRPC APIs_updateRenderInlineTyit()inApiConsoleApp._processModelChange()to ensure try-it panel visibility is updated when AMF model changesTesting
ApiConsole.js(test/api-console.amf.test.js)_noTryItValueis set correctly for gRPC APIs_isGrpcApi())ApiConsole.jsallowed the gRPC detection logic to go untested when usingApiConsoledirectly (withoutApiConsoleApp), which is why this issue was not caught earlierDependencies
@api-components/api-documentationversion (to be updated once the companion PR inapi-documentationis published)api-documentationcomponent will also implement gRPC detection logic to hide the try-it button at the component level