Skip to content

Commit deb3581

Browse files
Merge pull request #79 from advanced-rest-client/feat/W-15520261/async-api-examples
feat(W-15520261): show header example when is asyncApi
2 parents 0147ca6 + 869f3f3 commit deb3581

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@api-components/api-method-documentation",
33
"description": "A HTTP method documentation build from AMF model",
4-
"version": "5.2.15",
4+
"version": "5.2.16",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/ApiMethodDocumentation.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,12 +991,17 @@ export class ApiMethodDocumentation extends AmfHelperMixin(LitElement) {
991991
compatibility,
992992
graph
993993
} = this;
994+
995+
// hidden example when is not an async api
996+
const noMainExample = !this._isAsyncAPI(amf)
997+
994998
return html`<api-headers-document
995999
opened
9961000
.amf="${amf}"
9971001
?narrow="${narrow}"
9981002
?compatibility="${compatibility}"
9991003
?graph="${graph}"
1004+
.noMainExample="${noMainExample}"
10001005
.headers="${headers}"></api-headers-document>`;
10011006
}
10021007

0 commit comments

Comments
 (0)