OpenApiDocsModel¶
- pydantic model documenteer.conf._toml.OpenApiDocsModel¶
Model for OpenAPI documentation configurations in documenteer.toml.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "OpenApiDocsModel", "description": "Model for OpenAPI documentation configurations in documenteer.toml.", "type": "object", "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" } }, "$defs": { "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" } } }
- Fields:
- field doc_path: str = 'api'¶
- field generator: OpenApiGeneratorModel | None = None¶
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
.
- field openapi_path: str = '_static/openapi.json'¶
This is the path, relative to the Sphinx conf.py file, where the OpenAPI spec file is written. Default is
_static/openapi.json
.