Skip to content

Commit

Permalink
Merge pull request #58 from advanced-rest-client/feat/W-16216521/show…
Browse files Browse the repository at this point in the history
…-media-type

fix media type
  • Loading branch information
leandrogilcarrano authored Aug 6, 2024
2 parents d83fdbf + e3c3c29 commit 4a0243f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ dist/

demo/*.json
!demo/apis.json
!demo/models/avro.json
1 change: 1 addition & 0 deletions demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/ApiBodyDocumentElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down

0 comments on commit 4a0243f

Please sign in to comment.