From cb89535d7c93e3d043c7037bb6435e9f20c0d3a8 Mon Sep 17 00:00:00 2001 From: p1c2u Date: Mon, 12 Feb 2024 10:33:15 +0000 Subject: [PATCH] Reference code API docs --- docs/api/index.rst | 9 +++++++++ docs/api/openapi.rst | 5 +++++ docs/index.rst | 1 + openapi_core/app.py | 9 ++++++++- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docs/api/index.rst create mode 100644 docs/api/openapi.rst diff --git a/docs/api/index.rst b/docs/api/index.rst new file mode 100644 index 00000000..f70b04bc --- /dev/null +++ b/docs/api/index.rst @@ -0,0 +1,9 @@ +API Reference +============= + +Documentation with information of functions, classes or methods and all other parts of the OpenAPI-core public API. + +.. toctree:: + :maxdepth: 1 + + openapi diff --git a/docs/api/openapi.rst b/docs/api/openapi.rst new file mode 100644 index 00000000..2ed3cd43 --- /dev/null +++ b/docs/api/openapi.rst @@ -0,0 +1,5 @@ +`OpenAPI` class +=============== + +.. autoclass:: openapi_core.OpenAPI + :members: diff --git a/docs/index.rst b/docs/index.rst index 24eacced..b23e8d0a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,6 +11,7 @@ openapi-core customizations/index security extensions + api/index contributing Openapi-core is a Python library that adds client-side and server-side support diff --git a/openapi_core/app.py b/openapi_core/app.py index 5a2c5588..03e23a3d 100644 --- a/openapi_core/app.py +++ b/openapi_core/app.py @@ -71,7 +71,14 @@ class OpenAPI: - """OpenAPI class.""" + """`OpenAPI` application class, the main entrypoint class for OpenAPI-core. + + Import :class:`OpenAPI` class from the main :module:`openapi_core` module:: + + from openapi_core import OpenAPI + + app = OpenAPI(spec) + """ def __init__( self,