Skip to content

Commit

Permalink
Delete duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpmule committed Oct 17, 2023
1 parent 8ee6e1a commit b22be00
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/ExampleGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Example>|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
Expand Down

0 comments on commit b22be00

Please sign in to comment.