From b22be002dfe77d0e13db28c4d55a193766347ec4 Mon Sep 17 00:00:00 2001 From: alexperez Date: Tue, 17 Oct 2023 15:45:57 -0300 Subject: [PATCH] Delete duplicated --- src/ExampleGenerator.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/ExampleGenerator.js b/src/ExampleGenerator.js index 9dca91b..5732ace 100644 --- a/src/ExampleGenerator.js +++ b/src/ExampleGenerator.js @@ -823,38 +823,6 @@ export class ExampleGenerator extends AmfHelperMixin(Object) { return undefined; } - /** - * Computes list of examples for an array shape. - * @param {Object} schema The AMF's array shape - * @param {String} mime Current mime type - * @param {ExampleOptions} [opts={}] - * @return {Array|undefined} - */ - _computeExampleSchemaShape(schema, mime, opts = {}) { - const options = { ...opts }; - const iKey = this._getAmfKey(this.ns.aml.vocabularies.shapes.items); - debugger - const items = this._ensureArray(schema[iKey]); - if (!items) { - return undefined; - } - const isJson = mime.indexOf('json') !== -1; - options.parentName = options.typeName; - delete options.typeName; - // We need only first type here as arras can have different types - for (let i = 0, len = items.length; i < len; i++) { - const item = items[i]; - const result = this.computeExamples(item, mime, options); - if (result) { - if (isJson) { - processJsonArrayExamples(result); - } - return result; - } - } - return undefined; - } - /** * Computes example for an `and` shape. * @param {Object} schema The AMF's array shape