ProjectModel

pydantic model documenteer.conf._toml.ProjectModel

Model for the project table in the documenteer.toml file.

Parameters:

data (Any)

Show JSON schema
{
   "title": "ProjectModel",
   "description": "Model for the project table in the documenteer.toml file.",
   "type": "object",
   "properties": {
      "title": {
         "description": "Name of the project, used as titles throughout the documentation site.",
         "title": "Title",
         "type": "string"
      },
      "base_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Canonical URL of the site's root page.",
         "title": "Base Url"
      },
      "copyright": {
         "default": "",
         "description": "Copyright statement, without a 'copyright' prefix word.",
         "title": "Copyright",
         "type": "string"
      },
      "github_url": {
         "anyOf": [
            {
               "format": "uri",
               "maxLength": 2083,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The URL of the project's GitHub repository.",
         "title": "Github Url"
      },
      "github_default_branch": {
         "default": "main",
         "description": "The project's default development branch on GitHub.",
         "title": "Github Default Branch",
         "type": "string"
      },
      "version": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Version string.",
         "title": "Version"
      },
      "python": {
         "anyOf": [
            {
               "$ref": "#/$defs/PythonPackageModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "openapi": {
         "anyOf": [
            {
               "$ref": "#/$defs/OpenApiDocsModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "OpenApiDocsModel": {
         "description": "Model for OpenAPI documentation configurations in documenteer.toml.",
         "properties": {
            "generator": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/OpenApiGeneratorModel"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The function that generates the OpenAPI spec file from theapplication source code. If not specified, the OpenAPI spec file assumed to be generated by an external process and provided at the path specified by ``openapi_path``."
            },
            "openapi_path": {
               "default": "_static/openapi.json",
               "description": "This is the path, relative to the Sphinx conf.py file, where the OpenAPI spec file is written. Default is ``_static/openapi.json``.",
               "title": "Openapi Path",
               "type": "string"
            },
            "doc_path": {
               "default": "api",
               "title": "Doc Path",
               "type": "string"
            }
         },
         "title": "OpenApiDocsModel",
         "type": "object"
      },
      "OpenApiGeneratorModel": {
         "description": "Specification for the OpenAPI generator function used by the\n``documenteer.ext.openapi`` Sphinx extension.",
         "properties": {
            "function": {
               "description": "The Python function that generates the OpenAPI spec file. It must have the form ``module:func``. The function must return a JSON-serialized string.",
               "title": "Function",
               "type": "string"
            },
            "positional_args": {
               "description": "Positional arguments to pass to the generator function.",
               "items": {},
               "title": "Positional Args",
               "type": "array"
            },
            "keyword_args": {
               "description": "Keyword arguments to pass to the generator function.",
               "title": "Keyword Args",
               "type": "object"
            }
         },
         "required": [
            "function"
         ],
         "title": "OpenApiGeneratorModel",
         "type": "object"
      },
      "PythonPackageModel": {
         "description": "Model for a Python package (i.e. built with pyproject.toml-compatible\nbuild system.",
         "properties": {
            "package": {
               "description": "Package name",
               "title": "Package",
               "type": "string"
            },
            "documentation_url_key": {
               "default": "Homepage",
               "description": "Key for the documentation URL in the pyproject.toml [project.urls] table. The corresponding URL is used for the Sphinx html_baseurl configuration, which in turns sets the canonical URL link relation on the web pages.",
               "title": "Documentation Url Key",
               "type": "string"
            },
            "github_url_key": {
               "default": "Source",
               "description": "Key for the documentation URL in the pyproject.toml [project.urls] table. The corresponding URL is used for as an alternative to setting [project.github_url].",
               "title": "Github Url Key",
               "type": "string"
            }
         },
         "required": [
            "package"
         ],
         "title": "PythonPackageModel",
         "type": "object"
      }
   },
   "required": [
      "title"
   ]
}

Fields:
field base_url: HttpUrl | None = None

Canonical URL of the site’s root page.

field copyright: str = ''

Copyright statement, without a ‘copyright’ prefix word.

field github_default_branch: str = 'main'

The project’s default development branch on GitHub.

field github_url: HttpUrl | None = None

The URL of the project’s GitHub repository.

field openapi: OpenApiDocsModel | None = None
field python: PythonPackageModel | None = None
field title: str [Required]

Name of the project, used as titles throughout the documentation site.

field version: str | None = None

Version string.