diff --git a/demo/index.js b/demo/index.js
index d59d97a..1d212cd 100644
--- a/demo/index.js
+++ b/demo/index.js
@@ -29,7 +29,13 @@ class ApiDemo extends ApiDemoPage {
const webApi = this._computeApi(this.amf);
const method = this._computeMethodModel(webApi, id);
const expects = this._computeExpects(method);
- const headers = this._computeHeaders(expects);
+ let headers
+ if(expects){
+ headers = this._computeHeaders(expects);
+ }else{
+ const returns = this._computeReturns(method);
+ headers = this._computeHeaderSchema(returns[0]);
+ }
this.headers = headers;
this.hasData = true;
}
@@ -38,6 +44,7 @@ class ApiDemo extends ApiDemoPage {
return [
['demo-api', 'Demo API'],
['async-api', 'Async API'],
+ ['jldAsync26', 'Async API 26'],
].map(([file, label]) => html`
${label} - compact model
${label}
diff --git a/package-lock.json b/package-lock.json
index 697d418..106a995 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@api-components/api-headers-document",
- "version": "4.2.5",
+ "version": "4.2.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index a7afa58..28f4443 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@api-components/api-headers-document",
"description": "Documentation component for API headers based on AMF data model",
- "version": "4.2.5",
+ "version": "4.2.6",
"license": "Apache-2.0",
"main": "index.js",
"module": "index.js",
diff --git a/src/ApiHeadersDocument.js b/src/ApiHeadersDocument.js
index 7e23b3a..452a89f 100644
--- a/src/ApiHeadersDocument.js
+++ b/src/ApiHeadersDocument.js
@@ -80,8 +80,9 @@ export class ApiHeadersDocument extends LitElement {
}
render() {
- const { opened, headers, amf, narrow, compatibility, headerLevel, graph } = this;
+ const { opened, headers, amf, narrow, compatibility, headerLevel, graph, noMainExample } = this;
const hasHeaders = !!(headers) && (!!headers.length || !!Object.keys(headers).length);
+
return html`