Closed dt-rendstrasser closed 6 months ago
Thanks for bringing this up, @dt-rendstrasser. Here's a direct link to the spec that confirms that definitions
is still valid in newer versions of the spec but $defs
has superseded it.
I will confirm and implement this and if all works as expected I will release a fix. Standby.
Pulling this into the flagd provider for Java: https://github.com/open-feature/java-sdk-contrib/pull/789
Observed behavior
docs/schema/v0/flags.json and docs/schema/v0/targeting.json use the
$defs
keyword.Both JSON schemas use version
draft-07
based on the$schema
setting.A quick look at Google shows that the
$defs
keyword is not part of thedraft-07
version. Back then, it was nameddefinitions
. E.g., see https://opis.io/json-schema/2.x/definitions.html.Some json-schema-validators like com.networknt.json-schema-validator write warning logs by default if unknown keywords are encountered. This is exactly what happens in this case with this validator:
Expected Behavior
Would it be possible to use
definitions
instead of$defs
for as long as the JSON schema version isdraft-07
? Affected JSON schemas:Steps to reproduce
No response