TypeError: Cannot read property 'writeOnly' of undefined
at schema.required.schema.required.filter.name (node_modules/openapi-enforcer/src/schema/validate.js:153:67)
TypeError: Cannot read property 'readOnly' of undefined
at schema.required.schema.required.filter.name (node_modules/openapi-enforcer/src/schema/validate.js:152:68)
I am able to make it work by changing:
if (options.readWriteMode === 'write' && !prop.readOnly) return true
if (options.readWriteMode === 'read' && !prop.writeOnly) return true
To something like:
if (options.readWriteMode === 'write' && prop && !prop.readOnly) return true
if (options.readWriteMode === 'read' && prop && !prop.writeOnly) return true
Since version 1.12.6 I get error messages like:
I am able to make it work by changing:
To something like: