You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON Schema format can be used with more instance types than just strings, but it seems like CompilationOptions::with_format expects them to only be used with strings. #158 (comment) mentions that format validators are currently simply not applied to other types, but does not explain the reasoning behind that.
Is there any way to do this without forking? I saw CompilationOptions::with_keyword, but am unsure if built-in formats will keep working if I used that to extend format.
EDIT: Seems like the spec itself recommends implementing custom keywords for interoperability instead 🤔
Vocabularies do not support specifically declaring different value sets for keywords. Due to this limitation, and the historically uneven implementation of this keyword, it is RECOMMENDED to define additional keywords in a custom vocabulary rather than additional format attributes if interoperability is desired.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
JSON Schema
format
can be used with more instance types than just strings, but it seems likeCompilationOptions::with_format
expects them to only be used with strings.#158 (comment) mentions that format validators are currently simply not applied to other types, but does not explain the reasoning behind that.
Is there any way to do this without forking? I saw
CompilationOptions::with_keyword
, but am unsure if built-in formats will keep working if I used that to extendformat
.EDIT: Seems like the spec itself recommends implementing custom keywords for interoperability instead 🤔
Beta Was this translation helpful? Give feedback.
All reactions