json-schema-org / JSON-Schema-Test-Suite

A language agnostic test suite for the JSON Schema specifications
MIT License
603 stars 205 forks source link

test when $dynamicRef references a boolean schema #701

Closed karenetheridge closed 7 months ago

karenetheridge commented 8 months ago

This was an interesting one in my implementation - when looking for a $dynamicAnchor keyword at the destination schema, it threw an exception when that schema wasn't an object, but rather a boolean.

karenetheridge commented 8 months ago

One of the things that's changing for $dynamicRef in the next version...

Has that change already landed, or is it planned to be done in the future?

gregsdennis commented 8 months ago

Has that change already landed, or is it planned to be done in the future?

It hasn't yet. We have a task in the opening comment of the issue I linked, but that's it.

karenetheridge commented 7 months ago

Ok, I fixed the tests to make the true and false branches look more alike, as you suggested. I also added $schema keywords as I believe we now require that.

I left the draft-next tests alone, as the specified behaviour of $dynamicRef has not yet changed; when it does, this test (along with some others I'm sure) will start failing in the test suite and we can fix/remove them then.

gregsdennis commented 7 months ago

I left the draft-next tests alone, as the specified behaviour of $dynamicRef has not yet changed; when it does, this test (along with some others I'm sure) will start failing in the test suite and we can fix/remove them then.

I'm happy with that.