Hi! I tried to use the package to filter my openapi schema but I'm getting TypeError: Cannot read properties of null (reading 'includes') from this line in openapi-format.js.
In my api specification I have a request body schema that has paths among its properties so when this line of code is hit, this.key is "type", this.parent.key is "paths" but this.keys is null and thats why the null exception. I guess you wanted this validation to be run only when traversing paths=endpoints, not some paths property.
Some more strict check should be made to make sure it's only executed when it's on the "first-level" paths, e.g.:
Hi! I tried to use the package to filter my openapi schema but I'm getting
TypeError: Cannot read properties of null (reading 'includes')
from this line in openapi-format.js.In my api specification I have a request body schema that has
paths
among its properties so when this line of code is hit,this.key
is "type",this.parent.key
is "paths" butthis.keys
is null and thats why the null exception. I guess you wanted this validation to be run only when traversing paths=endpoints, not somepaths
property. Some more strict check should be made to make sure it's only executed when it's on the "first-level"paths
, e.g.: