Skip to content

Commit bbf9ccf

Browse files
committed
Use only autodoc to generate the API documentation
1 parent cdf0c71 commit bbf9ccf

File tree

7 files changed

+51
-29
lines changed

7 files changed

+51
-29
lines changed

docs/api/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
API Reference
2+
=============
3+
4+
.. toctree::
5+
:titlesonly:
6+
7+
/api/jsonschema/index
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:py:mod:`jsonschema.exceptions`
2+
===============================
3+
4+
.. automodule:: jsonschema.exceptions
5+
:members:
6+
:undoc-members:

docs/api/jsonschema/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
:py:mod:`jsonschema`
2+
====================
3+
4+
Submodules
5+
----------
6+
7+
.. toctree::
8+
:titlesonly:
9+
10+
/api/jsonschema/exceptions/index
11+
/api/jsonschema/protocols/index
12+
/api/jsonschema/validators/index
13+
14+
Package summary
15+
---------------
16+
17+
.. automodule:: jsonschema
18+
:members:
19+
:imported-members:
20+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:py:mod:`jsonschema.protocols`
2+
==============================
3+
4+
.. automodule:: jsonschema.protocols
5+
:members:
6+
:undoc-members:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
:py:mod:`jsonschema.validators`
2+
===============================
3+
4+
.. automodule:: jsonschema.validators
5+
:members:
6+
:undoc-members:

docs/conf.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
"sphinx.ext.intersphinx",
3737
"sphinx.ext.napoleon",
3838
"sphinx.ext.viewcode",
39-
40-
"autoapi.extension",
41-
"sphinx_autodoc_typehints",
4239
"sphinx_copybutton",
4340
"sphinx_json_schema_spec",
4441
"sphinxcontrib.spelling",
4542
"sphinxext.opengraph",
4643
]
4744

45+
# Add typing annotations to signatures
46+
autodoc_typehints = "signature"
47+
4848
cache_path = "_cache"
4949

5050
# Add any paths that contain templates here, relative to this directory.
@@ -159,28 +159,3 @@ def entire_domain(host):
159159
# -- Options for sphinxcontrib-spelling -----------------------------------
160160

161161
spelling_word_list_filename = "spelling-wordlist.txt"
162-
163-
# -- Options for autoapi ----------------------------------------------------
164-
165-
suppress_warnings = [
166-
"autoapi.python_import_resolution",
167-
"autoapi.toc_reference",
168-
"epub.duplicated_toc_entry",
169-
]
170-
autoapi_root = "api"
171-
autoapi_ignore = [
172-
"*/_[a-z]*.py",
173-
"*/__main__.py",
174-
"*/benchmarks/*",
175-
"*/cli.py",
176-
"*/tests/*",
177-
]
178-
autoapi_options = [
179-
"members",
180-
"undoc-members",
181-
"show-module-summary",
182-
"imported-members",
183-
]
184-
185-
autoapi_type = "python"
186-
autoapi_dirs = [PACKAGE_SRC]

docs/validate.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ versions.
5858

5959
.. autoclass:: TypeChecker
6060
:members:
61+
:noindex:
6162

6263
.. autoexception:: jsonschema.exceptions.UndefinedTypeCheck
6364
:noindex:
@@ -88,7 +89,7 @@ given how common validating these types are.
8889

8990
If you *do* want the generality, or just want to add a few specific additional
9091
types as being acceptable for a validator object, then you should update an
91-
existing `TypeChecker` or create a new one. You may then create a new
92+
existing `jsonschema.TypeChecker` or create a new one. You may then create a new
9293
`Validator` via `jsonschema.validators.extend`.
9394

9495
.. testcode::
@@ -252,6 +253,7 @@ The supported mechanism for ensuring these dependencies are present is again as
252253

253254
.. autoclass:: FormatChecker
254255
:members:
256+
:noindex:
255257
:exclude-members: cls_checks
256258

257259
.. attribute:: checkers

0 commit comments

Comments
 (0)