diff --git a/.gitignore b/.gitignore index 83cc892..1952dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ dist/ demo/*.json !demo/apis.json +!demo/models/avro.json diff --git a/demo/index.js b/demo/index.js index 2f42d05..5c8ef18 100644 --- a/demo/index.js +++ b/demo/index.js @@ -66,6 +66,7 @@ class ApiDemo extends ApiDemoPage { _apiListTemplate() { return [ ['demo-api', 'Demo API'], + ['avro', 'avro'], ['examples-api', 'Examples render demo'], ['raml-types', 'RAML types with raml examples'], ['caro-api', 'Carolina API issue'], diff --git a/package-lock.json b/package-lock.json index 83caf84..a4a58cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@api-components/api-body-document", - "version": "4.4.10", + "version": "4.4.11", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@api-components/api-body-document", - "version": "4.4.9", + "version": "4.4.11", "license": "Apache-2.0", "dependencies": { "@advanced-rest-client/arc-icons": "^3.3.4", @@ -593,9 +593,9 @@ } }, "node_modules/@api-components/amf-helper-mixin": { - "version": "4.5.22", - "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.22.tgz", - "integrity": "sha512-GMpLGWzhoKxs8yQRWx6/W/CKWKQOYkGZ5AmPzfy565LPvb9UvGs5EaF2kMcuZbKffIuZcb5RlXZR81ZTFdVStA==", + "version": "4.5.28", + "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.28.tgz", + "integrity": "sha512-uDB3B5AJOvr7Ocu7a1DPoghsvA0mAAtYzU8QdRZq4z+eWfkruDisLolgyvmzF3ZHC3VtMYr7ZwvW/wrWKhNOuw==", "dependencies": { "amf-json-ld-lib": "0.0.14" } @@ -14628,9 +14628,9 @@ } }, "@api-components/amf-helper-mixin": { - "version": "4.5.22", - "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.22.tgz", - "integrity": "sha512-GMpLGWzhoKxs8yQRWx6/W/CKWKQOYkGZ5AmPzfy565LPvb9UvGs5EaF2kMcuZbKffIuZcb5RlXZR81ZTFdVStA==", + "version": "4.5.28", + "resolved": "https://registry.npmjs.org/@api-components/amf-helper-mixin/-/amf-helper-mixin-4.5.28.tgz", + "integrity": "sha512-uDB3B5AJOvr7Ocu7a1DPoghsvA0mAAtYzU8QdRZq4z+eWfkruDisLolgyvmzF3ZHC3VtMYr7ZwvW/wrWKhNOuw==", "requires": { "amf-json-ld-lib": "0.0.14" } diff --git a/package.json b/package.json index 2309c49..4b4944b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@api-components/api-body-document", "description": "A component to render HTTP method body documentation based on AMF model", - "version": "4.4.10", + "version": "4.4.11", "license": "Apache-2.0", "main": "index.js", "module": "index.js", diff --git a/src/ApiBodyDocumentElement.js b/src/ApiBodyDocumentElement.js index 2c5203b..763b7fe 100644 --- a/src/ApiBodyDocumentElement.js +++ b/src/ApiBodyDocumentElement.js @@ -438,7 +438,7 @@ export class ApiBodyDocumentElement extends AmfHelperMixin(LitElement) { return undefined; } const data = body[selected]; - return /** @type string */ (this._getValue(data, this.ns.aml.vocabularies.core.mediaType)); + return /** @type string */ (this._getValue(data, this.ns.aml.vocabularies.core.mediaType) || this._getValue(data, this.ns.aml.vocabularies.apiContract.schemaMediaType)); } /**