File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -251,3 +251,26 @@ not set.
251251
252252``--base-uri `` overrides this behavior, setting a custom base URI for ``$ref ``
253253resolution.
254+
255+ ``--validator-class ``
256+ ~~~~~~~~~~~~~~~~~~~~~
257+
258+ ``check-jsonschema `` allows users to pass a custom validator class which
259+ implements the ``jsonschema.protocols.Validator `` protocol.
260+
261+ The format used for this argument is ``<module>:<class> ``. For example, to
262+ explicitly use the ``jsonschema `` validator for Draft7, use
263+ ``--validator-class 'jsonschema.validators:Draft7Validator' ``.
264+
265+ The module containing the validator class must be importable from within the
266+ ``check-jsonschema `` runtime context.
267+
268+ .. note ::
269+
270+ ``check-jsonschema `` will treat the validator class similarly to the
271+ ``jsonschema `` library builtin validators. This includes using documented
272+ extension points like passing a format checker or the behavior enabled with
273+ ``--fill-defaults ``. Users of this feature are recommended to build their
274+ validators using ``jsonschema ``'s documented interfaces (e.g.
275+ ``jsonschema.validators.extend ``) to ensure that their validators are
276+ compatible.
You can’t perform that action at this time.
0 commit comments