From 9c968e912e7a04abd7b6f3bb49b171e7d5dc4a78 Mon Sep 17 00:00:00 2001 From: leandrogilcarrano Date: Mon, 5 Aug 2024 17:18:45 -0300 Subject: [PATCH 1/2] fix media type --- .gitignore | 1 + demo/index.js | 1 + package-lock.json | 12 ++++++------ src/ApiBodyDocumentElement.js | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) 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 072a404..419fde0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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/src/ApiBodyDocumentElement.js b/src/ApiBodyDocumentElement.js index a8937bd..d04e26d 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)); } /** From e3c3c29aec81ea346a4c34c4a0534084df45b5dc Mon Sep 17 00:00:00 2001 From: leandrogilcarrano Date: Mon, 5 Aug 2024 17:29:19 -0300 Subject: [PATCH 2/2] 4.4.11 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b42e6d7..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", 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",