Skip to content

Commit 7576405

Browse files
Merge pull request #65 from advanced-rest-client/feat/W-15520261/async-api-example-name
feat(W-15520261): show display name
2 parents ecbd8c5 + 6dfa4f1 commit 7576405

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ExampleGenerator.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,14 @@ export class ExampleGenerator extends AmfHelperMixin(Object) {
692692
}
693693
let title = /** @type {string} */ (this._getValue(
694694
example,
695-
this.ns.aml.vocabularies.core.name
696-
));
695+
this.ns.aml.vocabularies.core.displayName
696+
))
697+
if (!title) {
698+
title = /** @type {string} */ (this._getValue(
699+
example,
700+
this.ns.aml.vocabularies.core.name
701+
));
702+
}
697703
if (title && title.indexOf('example_') === 0) {
698704
title = undefined;
699705
}

0 commit comments

Comments
 (0)