Closed fizan2904 closed 2 years ago
Hi fizan,
thank you for the feedback. With version 6.0.0 eachSchema
iterates over schemas defined with an type-array. Please pay attention to api changes.
Are there any json-schema helpers you are missing here?
I have used almost every utility in this library, and I like it very much.
While using the
eachSchema
method to iterate over schema I faced an issue. It will iterate only if thetype
keyword is not an array.eg: { type: 'string' } works fine but { type: ['string', 'null'] } doesn't.
https://github.com/sagold/json-schema-library/blob/master/lib/schema/getTypeId.ts at line 24
if (types[schema.type]) {
schema.type is assumed not to be an array everytime