|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://json.schemastore.org/partial-dfc.json", |
| 4 | + "$comment": "This is a partial schema for the `docstring-format-checker` package pyproject.toml, under the header [tool.dfc] or [tool.docstring-format-checker].", |
| 5 | + "type": "object", |
| 6 | + "additionalProperties": false, |
| 7 | + "properties": { |
| 8 | + "allow_undefined_sections": { |
| 9 | + "title": "Allow Undefined Sections", |
| 10 | + "description": "Allow sections not defined in the configuration.", |
| 11 | + "type": "boolean", |
| 12 | + "default": false |
| 13 | + }, |
| 14 | + "require_docstrings": { |
| 15 | + "title": "Require Docstrings", |
| 16 | + "description": "Require docstrings for all functions/methods.", |
| 17 | + "type": "boolean", |
| 18 | + "default": true |
| 19 | + }, |
| 20 | + "check_private": { |
| 21 | + "title": "Check Private Members", |
| 22 | + "description": "Check docstrings for private members (starting with an underscore).", |
| 23 | + "type": "boolean", |
| 24 | + "default": false |
| 25 | + }, |
| 26 | + "validate_param_types": { |
| 27 | + "title": "Validate Parameter Types", |
| 28 | + "description": "Validate that parameter types are provided in the docstring.", |
| 29 | + "type": "boolean", |
| 30 | + "default": true |
| 31 | + }, |
| 32 | + "optional_style": { |
| 33 | + "title": "Optional Style", |
| 34 | + "description": "The style for reporting issues in optional sections.", |
| 35 | + "type": "string", |
| 36 | + "enum": ["silent", "validate", "strict"], |
| 37 | + "default": "validate" |
| 38 | + }, |
| 39 | + "sections": { |
| 40 | + "type": "array", |
| 41 | + "title": "Docstring Sections", |
| 42 | + "description": "List of docstring section configurations.", |
| 43 | + "items": { |
| 44 | + "type": "object", |
| 45 | + "additionalProperties": false, |
| 46 | + "required": ["name", "type"], |
| 47 | + "properties": { |
| 48 | + "name": { |
| 49 | + "title": "Name", |
| 50 | + "description": "Name of the docstring section.", |
| 51 | + "type": "string" |
| 52 | + }, |
| 53 | + "type": { |
| 54 | + "title": "Type", |
| 55 | + "description": "Type of the section content.", |
| 56 | + "type": "string", |
| 57 | + "enum": [ |
| 58 | + "free_text", |
| 59 | + "list_name", |
| 60 | + "list_type", |
| 61 | + "list_name_and_type" |
| 62 | + ] |
| 63 | + }, |
| 64 | + "order": { |
| 65 | + "title": "Order", |
| 66 | + "description": "Order of the section in the docstring.", |
| 67 | + "type": ["integer", "null"], |
| 68 | + "default": null |
| 69 | + }, |
| 70 | + "admonition": { |
| 71 | + "title": "Admonition", |
| 72 | + "description": "Admonition style for the section. Can be False (no admonition) or a string specifying the admonition type.", |
| 73 | + "oneOf": [ |
| 74 | + { "type": "boolean", "enum": [false] }, |
| 75 | + { "type": "string" } |
| 76 | + ], |
| 77 | + "default": false |
| 78 | + }, |
| 79 | + "prefix": { |
| 80 | + "title": "Prefix", |
| 81 | + "description": "Prefix string for the admonition values.", |
| 82 | + "type": "string", |
| 83 | + "default": "" |
| 84 | + }, |
| 85 | + "required": { |
| 86 | + "title": "Required", |
| 87 | + "description": "Whether this section is required in the docstring.", |
| 88 | + "type": "boolean", |
| 89 | + "default": false |
| 90 | + }, |
| 91 | + "message": { |
| 92 | + "title": "Message", |
| 93 | + "description": "Optional message for validation errors.", |
| 94 | + "type": "string", |
| 95 | + "default": "" |
| 96 | + } |
| 97 | + } |
| 98 | + } |
| 99 | + } |
| 100 | + } |
| 101 | +} |
0 commit comments