Closed justin-tay closed 8 months ago
There's a difference between when the format assertion vocabulary is enabled and when format assertion behavior is enabled. The former is a recent thing, the latter has essentially always existed.
Those tests do not enable the format assertion vocabulary -- they set $schema
to the normal draft 2020 dialect ID, which does not require it.
They are however intended to be run (optionally) with format assertion behavior enabled in an implementation using whatever side channel mechanism is available for doing so.
Hope that helps?
Ok thanks for the clarification!
The specification seems to imply that when format assertions are enabled an unknown format is considered an error.
From https://json-schema.org/draft/2020-12/json-schema-validation#section-7.2.3
Since the tests in
optional/format/*.json
are intended to be run with format assertions enabled, are the test expectations inoptional/format/unknown.json
correct?https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/bf0360f4b7c51b8f968aabe7f3f49e12b120fc85/tests/draft2020-12/optional/format/unknown.json#L3-L44