summaryrefslogtreecommitdiff
path: root/docs/validate.rst
Commit message (Collapse)AuthorAgeFilesLines
* Run pip-licenses on the format-nongpl extra.Julian Berman2022-12-051-4/+7
|
* Merge remote-tracking branch 'origin/main' into docs/autodocJulian Berman2022-11-291-1/+1
|\ | | | | | | | | | | | | * origin/main: Remove noise from the Sphinx config. Fix instantiating validators with cached refs-to-bool schemas. Try fixing more Sphinx refs which fail only on Ubuntu...
| * Try fixing more Sphinx refs which fail only on Ubuntu...v4.17.2Julian Berman2022-11-291-1/+1
| |
* | Use only ``autodoc`` to generate the API documentationDaniƫl van Noord2022-11-281-1/+3
|/
* Better wording.Julian Berman2022-09-101-1/+2
| | | | Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Make it clearer that format: regex is Python regexes in this implementation.Julian Berman2022-09-101-61/+61
| | | | The same applies to pattern, patternProperties, etc.
* Deprecate jsonschema.draftN_format_checker attributes.v4.16.0Julian Berman2022-09-091-1/+1
| | | | | | | | | | | | | | | | Format support / enablement will change with vocabulary support, but in the interim, now that #905 is merged, these objects are better accessed by retrieving them directly from the corresponding validator. In other words: don't do: from jsonschema import draft202012_format_checker just do from jsonschema import Draft202012Validator do_whatever_with(Draft202012Validator.FORMAT_CHECKER)
* Add some deprecated directives (for previous deprecations) to the docs.Julian Berman2022-08-301-0/+4
|
* Make the link to Understanding JSON Schema more prominent.Julian Berman2022-08-301-5/+6
| | | | | (And remove some ancient language from when it was a twinkle in someone's eye).
* Minor non-functional changes to FormatChecker docstrings and __init__.Julian Berman2022-08-301-0/+1
|
* Slightly tidy the section on protocols in the docs.Julian Berman2022-08-301-22/+18
|
* Experiment with autoapi for generating explicit API documentation.Julian Berman2022-08-291-1/+11
| | | | Ref: #590
* Remove some old unnecessary explicit object superclasses.Julian Berman2022-08-181-1/+1
|
* Prefer 'keyword' over 'validator' in docs.Julian Berman2022-08-161-6/+6
| | | | | | | | | | | | | | In newer JSON Schema specifications we've standardized more on this language rather than calling things validators (and such a thing already has plenty of overloaded meaning here). This commit doesn't do any deprecation, so there's still some awkwardness in that ValidationError.validator is the keyword which failed validation, and Validator.VALIDATORS is a mapping of keywords to callables. We may choose to do so later, but for now will save some API churn in case something else changes.
* Update doc examples to use newer drafts' validators.Julian Berman2022-08-021-8/+10
| | | | | Obviously what was here works fine, but better to show the examples with a more recent spec.
* (Re-)enable more doctests.Julian Berman2022-08-021-3/+8
| | | | | It is way too easy to silently pass these :( -- specifically, the doctest directive only works for things with >>> prompts.
* Modernize the packaging setup via PEP 621 and Hatch.Julian Berman2022-05-281-1/+1
| | | | | | | | | | | | Doing so jettisons setuptools in favor of a more modern, well-designed, legacy-free, and now well-supported packaging tool, Hatch. No end-user facing behavior changes are expected for any users using a recent packaging setup (within the past 2-3 years), so please report any issues. Hatch: https://hatch.pypa.io/latest/ PEP 621: https://peps.python.org/pep-0621/
* Remove a last use of 'interface' instead of 'protocol'.Julian Berman2021-12-151-1/+1
|
* Fix references to IValidator; add protocol testsStephen Rosen2021-12-131-4/+4
| | | | | | | | Several remaining cases referred to `IValidator` which is now just `Validtator`. Fix these. Add a test which ensures that all valdiators pass `isinstance(x, Validator)` using the runtime-checkable protocol.
* Apply suggestions from code reviewStephen Rosen2021-12-131-3/+3
| | | | | | Primarily, rewrite `IValidator` to `Validator` Co-authored-by: Julian Berman <Julian@GrayVines.com>
* Update docs/validate.rstStephen Rosen2021-12-131-1/+1
| | | Co-authored-by: Julian Berman <Julian@GrayVines.com>
* Add `jsonschema.protocols.IValidator`Stephen Rosen2021-12-131-138/+4
| | | | | | | | | | | | | | | | This is a Protocol implementation for type checking under mypy and other static analyzers. It uses the protocol class defined in py3.8+ and uses typing_extensions as a backport for py3.7 The documentation-only validator class has been replaced with the protocol, and docs are now driven via autoclass on the protocol. Importantly, several documented methods of the class have been removed, as they were marked deprecated under jsonschema v3.0 and are no longer provided by the builtin validators. Minor adjustments to the docs are made to repoint references at the new class definition.
* Add the missing format dependency documentation.Julian Berman2021-10-021-3/+8
|
* Add Validator.evolve, deprecating passing _schema to methods.Julian Berman2021-08-251-0/+12
| | | | | | | | | | | | | | | | | | | | A Validator should be thought of as encapsulating validation with a single fixed schema. Previously, iter_errors and is_valid allowed passing a second argument, which was a different schema to use for one method call. This was mostly for convenience, since the second argument is often used during sub-validation whilst say, recursing. The correct way to do so now is to say: validator.evolve(schema=new_schema).iter_errors(...) validator.evolve(schema=new_schema).is_valid(...) instead, which is essentially equally convenient. Closes: #522
* Depend on rfc3339-validator for format, even for non-nonGPL.Julian Berman2021-08-241-3/+2
| | | | | | | It passes all the new upstream (non-ASCII date/time) tests, whilst strict-rfc3339 does not, plus it's maintained. More props to @naimetti.
* May as well add support for Draft 2019 as well.Julian Berman2021-08-181-0/+2
| | | | recursiveRef is broken in the same way dynamicRef is.
* And add it to the docs.Julian Berman2021-08-181-0/+2
|
* Pick a format checker that has no external dep now that fqdn exists.Julian Berman2020-08-121-3/+3
|
* Ref Py3 in the docs.Julian Berman2020-08-041-1/+1
|
* Only the draft2019-09 draft actually uses an HTTPS URI.Julian Berman2020-03-231-4/+4
| | | | | The other drafts are *available* over HTTPS, but their canonical URI has apparently not changed.
* Add/update some info on why format works the way it does.Julian Berman2020-03-211-0/+2
| | | | Closes: #653
* format_nongpl docs, and style fixesNicolas Aimetti2019-10-311-8/+21
|
* Make the same note about idn-email.v3.0.0b1Julian Berman2019-01-211-7/+13
|
* And now don't recommend people use bare FormatChecker.Julian Berman2019-01-151-1/+1
|
* Spelling, indirectly.Julian Berman2019-01-111-20/+20
|
* Minor style.Julian Berman2019-01-061-1/+3
|
* Update the table of formats.Julian Berman2019-01-051-14/+31
|
* First step on Draft7 support.Julian Berman2018-09-301-0/+2
| | | | | Add everything that's the same in Draft6, which appears to just leave out if/then/else.
* HTTPS (almost) everywhere.Julian Berman2018-09-291-5/+5
|
* Fix infinite recursion in TypeChecker exampleChristian Lyder Jacobsen2018-08-141-1/+1
|
* Merge remote-tracking branch 'origin/master' into draft6Julian Berman2018-05-141-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | * origin/master: This doesn't exist anymore. Skip the newly added case-insensitive date-time tests. Less hard to read. Squashed 'json/' changes from cb2b906..2ca50c0 Re-wording email disclaimer to fit the reasoning behind it Clarifying limitation of email validator Layout changed for Draft7 format tests. Assume the next version will be 3.0.0
| * Re-wording email disclaimer to fit the reasoning behind itJon Staab2018-05-091-5/+6
| |
| * Clarifying limitation of email validatorJon Staab2018-05-081-0/+7
| |
| * Assume the next version will be 3.0.0Julian Berman2018-05-031-2/+2
| |
* | Kill isodate.Julian Berman2018-05-031-7/+0
| |
* | Draft 6 for docs.Julian Berman2018-05-031-4/+6
| |
* | Assume the next version will be 3.0.0Julian Berman2018-05-011-2/+2
|/
* Use a reST note.Julian Berman2018-04-181-3/+5
|
* add clarification on validating with format checkersSonny2018-04-161-1/+7
|
* Undo Napoleon in the reST files.Julian Berman2017-12-281-64/+36
| | | | Let's see what https://github.com/sphinx-doc/sphinx/issues/4345 turns up.