Skip to content
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

fix(schema) handle conditionals on structured data #3936

Merged
merged 2 commits into from Oct 30, 2018

Conversation

Projects
None yet
3 participants
@hishamhm
Copy link
Member

hishamhm commented Oct 30, 2018

Conditionals set on properties of a structured field, such as elements of a set, were not being correctly checked, because the if_match validator ignored the type of the field, and thus did not recurse on attributes such as elements.

The core of the fix are the small changes in the conditional validator, getting rid of the "skip" pseudo-type (hooray!). The rest of the additions (get_schema_field, allow_record_fields_by_name) are there to allow nested fields to be specified (e.g. so that a match on field config.a.b can trigger a constraint on field config.c.d).

Includes a test.

fix(schema) fix error message of EQ validator
it was showing the given value, and not the wanted one

@hishamhm hishamhm force-pushed the fix/conditionals-on-substructure branch from 9ab55ff to 9854d9c Oct 30, 2018

stack overflow in CI

fix(schema) handle conditionals on structured data
Conditionals set on properties of a structured field, such
as elements of a set, were not being correctly checked, because
the `if_match` validator ignored the type of the field, and
thus did not recurse on attributes such as `elements`.

The core of the fix are the small changes in the `conditional`
validator. The rest of the additions (`get_schema_field`,
`allow_record_fields_by_name`) are there to allow nested fields
to be specified (e.g. so that a match on field `config.a.b`
can trigger a constraint on field `config.c.d`).

Includes a test.

@hishamhm hishamhm force-pushed the fix/conditionals-on-substructure branch from 850040b to 229375d Oct 30, 2018

@thibaultcha thibaultcha merged commit 8507d93 into next Oct 30, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@thibaultcha thibaultcha deleted the fix/conditionals-on-substructure branch Oct 30, 2018

@thibaultcha

This comment has been minimized.

Copy link
Member

thibaultcha commented Oct 30, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.