Skip to content

Commit b22be00

Browse files
author
alexperez
committed
Delete duplicated
1 parent 8ee6e1a commit b22be00

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/ExampleGenerator.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -823,38 +823,6 @@ export class ExampleGenerator extends AmfHelperMixin(Object) {
823823
return undefined;
824824
}
825825

826-
/**
827-
* Computes list of examples for an array shape.
828-
* @param {Object} schema The AMF's array shape
829-
* @param {String} mime Current mime type
830-
* @param {ExampleOptions} [opts={}]
831-
* @return {Array<Example>|undefined}
832-
*/
833-
_computeExampleSchemaShape(schema, mime, opts = {}) {
834-
const options = { ...opts };
835-
const iKey = this._getAmfKey(this.ns.aml.vocabularies.shapes.items);
836-
debugger
837-
const items = this._ensureArray(schema[iKey]);
838-
if (!items) {
839-
return undefined;
840-
}
841-
const isJson = mime.indexOf('json') !== -1;
842-
options.parentName = options.typeName;
843-
delete options.typeName;
844-
// We need only first type here as arras can have different types
845-
for (let i = 0, len = items.length; i < len; i++) {
846-
const item = items[i];
847-
const result = this.computeExamples(item, mime, options);
848-
if (result) {
849-
if (isJson) {
850-
processJsonArrayExamples(result);
851-
}
852-
return result;
853-
}
854-
}
855-
return undefined;
856-
}
857-
858826
/**
859827
* Computes example for an `and` shape.
860828
* @param {Object} schema The AMF's array shape

0 commit comments

Comments
 (0)