Skip to content

Commit b4fb4db

Browse files
committed
chore: Add JSON schema for handler's options
1 parent c4d32e1 commit b4fb4db

1 file changed

Lines changed: 169 additions & 0 deletions

File tree

docs/schema.json

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-07/schema",
3+
"title": "Python handler for mkdocstrings.",
4+
"type": "object",
5+
"properties": {
6+
"python": {
7+
"markdownDescription": "https://mkdocstrings.github.io/python/",
8+
"type": "object",
9+
"properties": {
10+
"custom_templates": {
11+
"title": "The path to a directory containing custom templates. The path is relative to the current working directory.",
12+
"markdownDescription": "https://mkdocstrings.github.io/theming/",
13+
"type": "string",
14+
"default": null,
15+
"format": "path"
16+
},
17+
"docstring_style": {
18+
"title": "The docstring style to use when parsing docstrings.",
19+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
20+
"enum": ["google", "numpy", "sphinx"],
21+
"default": "google"
22+
},
23+
"docstring_options": {
24+
"title": "The options for the docstring parser.",
25+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
26+
"default": null,
27+
"items": {
28+
"$ref": "https://raw.githubusercontent.com/mkdocstrings/griffe/master/docs/schema-docstrings-options.json"
29+
}
30+
},
31+
"show_root_heading": {
32+
"title": "Show the heading of the object at the root of the documentation tree.",
33+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
34+
"type": "boolean",
35+
"default": false
36+
},
37+
"show_root_toc_entry": {
38+
"title": "If the root heading is not shown, at least add a ToC entry for it.",
39+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
40+
"type": "boolean",
41+
"default": true
42+
},
43+
"show_root_full_path": {
44+
"title": "Show the full Python path for the root object heading.",
45+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
46+
"type": "boolean",
47+
"default": true
48+
},
49+
"show_root_members_full_path": {
50+
"title": "Show the full Python path of the root members.",
51+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
52+
"type": "boolean",
53+
"default": false
54+
},
55+
"show_object_full_path": {
56+
"title": "Show the full Python path of every object.",
57+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
58+
"type": "boolean",
59+
"default": false
60+
},
61+
"show_category_heading": {
62+
"title": "When grouped by categories, show a heading for each category.",
63+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
64+
"type": "boolean",
65+
"default": false
66+
},
67+
"show_if_no_docstring": {
68+
"title": "Show the object heading even if it has no docstring or children with docstrings.",
69+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
70+
"type": "boolean",
71+
"default": false
72+
},
73+
"show_signature": {
74+
"title": "Show methods and functions signatures.",
75+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
76+
"type": "boolean",
77+
"default": true
78+
},
79+
"show_signature_annotations": {
80+
"title": "Show the type annotations in methods and functions signatures.",
81+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
82+
"type": "boolean",
83+
"default": false
84+
},
85+
"separate_signature": {
86+
"title": "Whether to put the whole signature in a code block below the heading. If Black is installed, the signature is also formatted using it.",
87+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
88+
"type": "boolean",
89+
"default": false
90+
},
91+
"line_length": {
92+
"title": "Maximum line length when formatting code/signatures.",
93+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
94+
"type": "integer",
95+
"default": 60
96+
},
97+
"merge_init_into_class": {
98+
"title": "Whether to merge the `__init__` method into the class' signature and docstring.",
99+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
100+
"type": "boolean",
101+
"default": false
102+
},
103+
"show_source": {
104+
"title": "Show the source code of this object..",
105+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
106+
"type": "boolean",
107+
"default": true
108+
},
109+
"show_bases": {
110+
"title": "Show the base classes of a class.",
111+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
112+
"type": "boolean",
113+
"default": true
114+
},
115+
"show_submodules": {
116+
"title": "When rendering a module, show its submodules recursively.",
117+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
118+
"type": "boolean",
119+
"default": false
120+
},
121+
"group_by_category": {
122+
"title": "Group the object's children by categories: attributes, classes, functions, and modules.",
123+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
124+
"type": "boolean",
125+
"default": true
126+
},
127+
"heading_level": {
128+
"title": "The initial heading level to use.",
129+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
130+
"type": "integer",
131+
"default": 2
132+
},
133+
"members_order": {
134+
"title": "The members ordering to use.",
135+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
136+
"enum": ["alphabetical", "source"],
137+
"default": "alphabetical"
138+
},
139+
"docstring_section_style": {
140+
"title": "The style used to render docstring sections.",
141+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
142+
"enum": ["list", "spacy", "table"],
143+
"default": "table"
144+
},
145+
"members": {
146+
"title": "An explicit list of members to render.",
147+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
148+
"type": [
149+
"boolean",
150+
"array"
151+
],
152+
"default": null
153+
},
154+
"filters": {
155+
"title": "A list of filters applied to filter objects based on their name. A filter starting with `!` will exclude matching objects instead of including them. The `members` option takes precedence over `filters` (filters will still be applied recursively to lower members in the hierarchy).",
156+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
157+
"type": "array",
158+
"default": ["!^_[^_]"]
159+
},
160+
"annotations_path": {
161+
"title": "The verbosity for annotations path.",
162+
"markdownDescription": "https://mkdocstrings.github.io/python/usage/#globallocal-options",
163+
"enum": ["brief", "source"],
164+
"default": "brief"
165+
}
166+
}
167+
}
168+
}
169+
}

0 commit comments

Comments
 (0)