@api-components/api-example-generator
Advanced tools
Comparing version
{ | ||
"name": "@api-components/api-example-generator", | ||
"description": "Examples generator from AMF model", | ||
"version": "4.4.12", | ||
"version": "4.4.13", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -60,2 +60,6 @@ import {AmfHelperMixin} from '@api-components/amf-helper-mixin/amf-helper-mixin.js'; | ||
values?: Array<Example>; | ||
/** | ||
* Example description | ||
*/ | ||
description?: string; | ||
} | ||
@@ -62,0 +66,0 @@ |
@@ -20,2 +20,3 @@ import { AmfHelperMixin } from '@api-components/amf-helper-mixin/amf-helper-mixin.js'; | ||
* @property {String=} raw Raw value of RAML example. This value is a YAML or JSON | ||
* @property {String=} description Example description | ||
* schema value. This is only set when raw value is available in the model and it is not JSON/XML. | ||
@@ -656,2 +657,6 @@ * @property {Array<Example>=} values Only when `hasUnion` is set. | ||
} | ||
const description = /** @type {string} */ (this._getValue( | ||
example, | ||
this.ns.aml.vocabularies.core.description | ||
)); | ||
const hasRaw = !!raw; | ||
@@ -661,2 +666,5 @@ const result = {}; | ||
result.hasUnion = false; | ||
if (description) { | ||
result.description = description; | ||
} | ||
if (result.hasTitle) { | ||
@@ -663,0 +671,0 @@ result.title = title; |
201063
0.16%2758
0.44%