Skip to content

Commit 4a0243f

Browse files
Merge pull request #58 from advanced-rest-client/feat/W-16216521/show-media-type
fix media type
2 parents d83fdbf + e3c3c29 commit 4a0243f

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ dist/
6262

6363
demo/*.json
6464
!demo/apis.json
65+
!demo/models/avro.json

demo/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class ApiDemo extends ApiDemoPage {
6666
_apiListTemplate() {
6767
return [
6868
['demo-api', 'Demo API'],
69+
['avro', 'avro'],
6970
['examples-api', 'Examples render demo'],
7071
['raml-types', 'RAML types with raml examples'],
7172
['caro-api', 'Carolina API issue'],

package-lock.json

Lines changed: 8 additions & 8 deletions
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-body-document",
33
"description": "A component to render HTTP method body documentation based on AMF model",
4-
"version": "4.4.10",
4+
"version": "4.4.11",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/ApiBodyDocumentElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export class ApiBodyDocumentElement extends AmfHelperMixin(LitElement) {
438438
return undefined;
439439
}
440440
const data = body[selected];
441-
return /** @type string */ (this._getValue(data, this.ns.aml.vocabularies.core.mediaType));
441+
return /** @type string */ (this._getValue(data, this.ns.aml.vocabularies.core.mediaType) || this._getValue(data, this.ns.aml.vocabularies.apiContract.schemaMediaType));
442442
}
443443

444444
/**

0 commit comments

Comments
 (0)