From 6dfa4f112a5f44b4eca679f36573f1270bd6e5b4 Mon Sep 17 00:00:00 2001 From: leandrogilcarrano Date: Mon, 22 Apr 2024 15:35:55 -0300 Subject: [PATCH] feat(W-15520261): show display name --- src/ExampleGenerator.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ExampleGenerator.js b/src/ExampleGenerator.js index 07f444b..3e03fe5 100644 --- a/src/ExampleGenerator.js +++ b/src/ExampleGenerator.js @@ -692,8 +692,14 @@ export class ExampleGenerator extends AmfHelperMixin(Object) { } let title = /** @type {string} */ (this._getValue( example, - this.ns.aml.vocabularies.core.name - )); + this.ns.aml.vocabularies.core.displayName + )) + if (!title) { + title = /** @type {string} */ (this._getValue( + example, + this.ns.aml.vocabularies.core.name + )); + } if (title && title.indexOf('example_') === 0) { title = undefined; }