7171
7272
7373class OpenAPI :
74- """OpenAPI class."""
74+ """`OpenAPI` application class, the main entrypoint class for OpenAPI-core.
75+
76+ Read more information, in the
77+ [OpenAPI-core docs for First Steps](https://openapi-core.readthedocs.io/#first-steps).
78+
79+ Import :class:`OpenAPI` class from the main `openapi_core` module::
80+
81+ from openapi_core import OpenAPI
82+
83+ app = OpenAPI(spec)
84+ """
7585
7686 def __init__ (
7787 self ,
@@ -90,27 +100,31 @@ def __init__(
90100 def from_dict (
91101 cls , data : Schema , config : Optional [Config ] = None
92102 ) -> "OpenAPI" :
103+ """Creates :class:`OpenAPI` class instance from a dictionary."""
93104 sp = SchemaPath .from_dict (data )
94105 return cls (sp , config = config )
95106
96107 @classmethod
97108 def from_path (
98109 cls , path : Path , config : Optional [Config ] = None
99110 ) -> "OpenAPI" :
111+ """Creates :class:`OpenAPI` class instance from a path object."""
100112 sp = SchemaPath .from_path (path )
101113 return cls (sp , config = config )
102114
103115 @classmethod
104116 def from_file_path (
105117 cls , file_path : str , config : Optional [Config ] = None
106118 ) -> "OpenAPI" :
119+ """Creates :class:`OpenAPI` class instance from a file path string."""
107120 sp = SchemaPath .from_file_path (file_path )
108121 return cls (sp , config = config )
109122
110123 @classmethod
111124 def from_file (
112125 cls , fileobj : SupportsRead , config : Optional [Config ] = None
113126 ) -> "OpenAPI" :
127+ """Creates :class:`OpenAPI` class instance from a file object."""
114128 sp = SchemaPath .from_file (fileobj )
115129 return cls (sp , config = config )
116130
0 commit comments