-
Notifications
You must be signed in to change notification settings - Fork 0
Build/fix conditionally required not applying #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: build/v3.2.1-allow-dynamic-check
Are you sure you want to change the base?
Build/fix conditionally required not applying #1
Conversation
rootSchema, | ||
rootSchema, | ||
schemaPath, | ||
// TODO: Why was this previously schemaPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was schemaPath
because the logic for getting the next heigher schema path was delegated to isRequiredInParent
. Maybe that was why we were skipping every other parent.
has(get(currentSchema, 'properties'), prevSegments[i]) | ||
(has(currentSchema, prevSegments[i]) || | ||
(has(currentSchema, 'properties') && | ||
has(get(currentSchema, 'properties'), prevSegments[i]))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since now we are adding /items
in the schema path, then maybe there should be another condition for it. For example would a path like this cause a problem: #/properties/object/properties/array/items/properties/nestedArray/items/properties/propertyName
?
} | ||
|
||
const nextHigherSchemaPath = nextHigherSchemaSegments.join('/'); | ||
const nextHigherSchema = Resolve.schema(schema, nextHigherSchemaPath, schema); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think using schema
instead of rootSchema
is better here. From what I see, it is true that we don't need the rootSchema
, but if a new feature is added that relies on it, maybe it would cause a problem.
No description provided.