diff --git a/docs/index.rst b/docs/index.rst index d491b26..6da45f8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,6 +2,23 @@ Resources are exposed via a `referencing.Registry`. +Usage +----- + +There is essentially one main object provided, `jsonschema_specifications.REGISTRY`, which is a `referencing.Registry` (or more specifically a `referencing.jsonschema.SchemaRegistry`) containing all of the "official" JSON Schemas. + +For full details on using it, see the `referencing documentation `, but for example: + +.. code:: + + from jsonschema_specifications import REGISTRY as SPECIFICATIONS + + DRAFT202012_DIALECT_URI = "https://json-schema.org/draft/2020-12/schema" + print(SPECIFICATIONS.contents(DRAFT202012_DIALECT_URI)) + + # -> prints the Draft 2020-12 meta-schema + + Contents -------- diff --git a/pyproject.toml b/pyproject.toml index af47f49..3b34f49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,11 @@ Issues = "https://github.com/python-jsonschema/jsonschema-specifications/issues/ Funding = "https://github.com/sponsors/Julian" Source = "https://github.com/python-jsonschema/jsonschema-specifications" +[tool.doc8] +ignore = [ + "D001", # one sentence per line, so max length doesn't make sense +] + [tool.isort] combine_as_imports = true from_first = true