openapi3-parser 1.1.19__tar.gz → 1.1.21__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/PKG-INFO +13 -3
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/setup.py +1 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi3_parser.egg-info/PKG-INFO +13 -3
- openapi3_parser-1.1.21/src/openapi3_parser.egg-info/requires.txt +2 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/__init__.py +1 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/content.py +2 -2
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/header.py +1 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/operation.py +4 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/parameter.py +6 -2
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/path.py +2 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/request.py +1 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/response.py +2 -1
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/schemas.py +3 -3
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/parser.py +17 -3
- openapi3_parser-1.1.21/src/openapi_parser/py.typed +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/specification.py +2 -1
- openapi3_parser-1.1.19/src/openapi3_parser.egg-info/requires.txt +0 -2
- openapi3_parser-1.1.19/src/openapi_parser/builders/__init__.py +0 -33
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/license.txt +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/setup.cfg +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi3_parser.egg-info/SOURCES.txt +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi3_parser.egg-info/dependency_links.txt +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi3_parser.egg-info/top_level.txt +0 -0
- /openapi3_parser-1.1.19/src/openapi_parser/py.typed → /openapi3_parser-1.1.21/src/openapi_parser/builders/__init__.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/common.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/external_doc.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/info.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/oauth_flow.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/schema.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/security.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/server.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/tag.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/enumeration.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/errors.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/loose_types.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/resolver.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/tests/test_enumeration.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/tests/test_parser.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/tests/test_parser_options.py +0 -0
- {openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/tests/test_runner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: openapi3-parser
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.21
|
|
4
4
|
Summary: OpenAPI v3 parser
|
|
5
5
|
Home-page: https://github.com/manchenkoff/openapi3-parser
|
|
6
6
|
Author: Artem Manchenkov
|
|
@@ -17,4 +17,14 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: license.txt
|
|
19
19
|
Requires-Dist: prance>=0.20.2
|
|
20
|
-
Requires-Dist: openapi-spec-validator
|
|
20
|
+
Requires-Dist: openapi-spec-validator>=0.7.1
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: keywords
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: project-url
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: summary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: openapi3-parser
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.21
|
|
4
4
|
Summary: OpenAPI v3 parser
|
|
5
5
|
Home-page: https://github.com/manchenkoff/openapi3-parser
|
|
6
6
|
Author: Artem Manchenkov
|
|
@@ -17,4 +17,14 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: license.txt
|
|
19
19
|
Requires-Dist: prance>=0.20.2
|
|
20
|
-
Requires-Dist: openapi-spec-validator
|
|
20
|
+
Requires-Dist: openapi-spec-validator>=0.7.1
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: keywords
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: project-url
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: summary
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Type, Union, Any
|
|
3
3
|
|
|
4
|
-
from . import SchemaFactory
|
|
4
|
+
from .schema import SchemaFactory
|
|
5
5
|
from ..enumeration import ContentType
|
|
6
|
-
from ..specification import Content
|
|
7
6
|
from ..loose_types import LooseContentType
|
|
7
|
+
from ..specification import Content
|
|
8
8
|
|
|
9
9
|
logger = logging.getLogger(__name__)
|
|
10
10
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Dict
|
|
3
3
|
|
|
4
|
-
from . import ExternalDocBuilder, ParameterBuilder, RequestBuilder, ResponseBuilder
|
|
5
4
|
from .common import extract_typed_props, PropertyMeta, extract_extension_attributes
|
|
5
|
+
from .external_doc import ExternalDocBuilder
|
|
6
|
+
from .parameter import ParameterBuilder
|
|
7
|
+
from .request import RequestBuilder
|
|
8
|
+
from .response import ResponseBuilder
|
|
6
9
|
from ..enumeration import OperationMethod
|
|
7
10
|
from ..specification import Operation, Response
|
|
8
11
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
|
-
from . import SchemaFactory
|
|
5
4
|
from .common import extract_typed_props, PropertyMeta, extract_extension_attributes
|
|
5
|
+
from .content import ContentBuilder
|
|
6
|
+
from .schema import SchemaFactory
|
|
6
7
|
from ..enumeration import ParameterLocation, HeaderParameterStyle, PathParameterStyle, QueryParameterStyle, \
|
|
7
8
|
CookieParameterStyle
|
|
8
9
|
from ..specification import Parameter
|
|
@@ -26,9 +27,11 @@ default_styles_by_location = {
|
|
|
26
27
|
|
|
27
28
|
class ParameterBuilder:
|
|
28
29
|
schema_factory: SchemaFactory
|
|
30
|
+
content_builder: ContentBuilder
|
|
29
31
|
|
|
30
|
-
def __init__(self, schema_factory: SchemaFactory) -> None:
|
|
32
|
+
def __init__(self, schema_factory: SchemaFactory, content_builder: ContentBuilder) -> None:
|
|
31
33
|
self.schema_factory = schema_factory
|
|
34
|
+
self.content_builder = content_builder
|
|
32
35
|
|
|
33
36
|
def build_list(self, parameters: List[dict]) -> list[Parameter]:
|
|
34
37
|
return [self.build(parameter) for parameter in parameters]
|
|
@@ -41,6 +44,7 @@ class ParameterBuilder:
|
|
|
41
44
|
"location": PropertyMeta(name="in", cast=ParameterLocation),
|
|
42
45
|
"required": PropertyMeta(name="required", cast=None),
|
|
43
46
|
"schema": PropertyMeta(name="schema", cast=self.schema_factory.create),
|
|
47
|
+
"content": PropertyMeta(name="content", cast=self.content_builder.build_list),
|
|
44
48
|
"description": PropertyMeta(name="description", cast=str),
|
|
45
49
|
"deprecated": PropertyMeta(name="deprecated", cast=None),
|
|
46
50
|
"explode": PropertyMeta(name="explode", cast=None),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Dict
|
|
3
3
|
|
|
4
|
-
from . import OperationBuilder, ParameterBuilder
|
|
5
4
|
from .common import extract_typed_props, PropertyMeta, extract_extension_attributes
|
|
5
|
+
from .operation import OperationBuilder
|
|
6
|
+
from .parameter import ParameterBuilder
|
|
6
7
|
from ..enumeration import OperationMethod
|
|
7
8
|
from ..specification import Path
|
|
8
9
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from typing import Union
|
|
3
3
|
|
|
4
|
-
from . import ContentBuilder, HeaderBuilder
|
|
5
4
|
from .common import extract_typed_props, PropertyMeta
|
|
5
|
+
from .content import ContentBuilder
|
|
6
|
+
from .header import HeaderBuilder
|
|
6
7
|
from ..specification import Response
|
|
7
8
|
|
|
8
9
|
logger = logging.getLogger(__name__)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
|
+
from .schema import SchemaFactory
|
|
3
4
|
from ..specification import Schema
|
|
4
|
-
from . import SchemaFactory
|
|
5
|
-
|
|
6
5
|
|
|
7
6
|
logger = logging.getLogger(__name__)
|
|
8
7
|
|
|
8
|
+
|
|
9
9
|
class SchemasBuilder:
|
|
10
10
|
schema_factory: SchemaFactory
|
|
11
11
|
|
|
@@ -16,6 +16,6 @@ class SchemasBuilder:
|
|
|
16
16
|
logger.debug(f"Schemas parsing: {schemas.keys()}")
|
|
17
17
|
|
|
18
18
|
return {
|
|
19
|
-
key
|
|
19
|
+
key: self.schema_factory.create(value)
|
|
20
20
|
for key, value in schemas.items()
|
|
21
21
|
}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Optional # noqa: F401
|
|
3
3
|
|
|
4
|
-
from .builders import *
|
|
5
4
|
from .builders.common import extract_typed_props, PropertyMeta
|
|
5
|
+
from .builders.content import ContentBuilder
|
|
6
|
+
from .builders.external_doc import ExternalDocBuilder
|
|
7
|
+
from .builders.header import HeaderBuilder
|
|
8
|
+
from .builders.info import InfoBuilder
|
|
9
|
+
from .builders.oauth_flow import OAuthFlowBuilder
|
|
10
|
+
from .builders.operation import OperationBuilder
|
|
11
|
+
from .builders.parameter import ParameterBuilder
|
|
12
|
+
from .builders.path import PathBuilder
|
|
13
|
+
from .builders.request import RequestBuilder
|
|
14
|
+
from .builders.response import ResponseBuilder
|
|
15
|
+
from .builders.schema import SchemaFactory
|
|
16
|
+
from .builders.schemas import SchemasBuilder
|
|
17
|
+
from .builders.security import SecurityBuilder
|
|
18
|
+
from .builders.server import ServerBuilder
|
|
19
|
+
from .builders.tag import TagBuilder
|
|
6
20
|
from .errors import ParserError
|
|
7
21
|
from .resolver import OpenAPIResolver
|
|
8
22
|
from .specification import *
|
|
@@ -89,7 +103,7 @@ def _create_parser(strict_enum: bool = True) -> Parser:
|
|
|
89
103
|
schema_factory = SchemaFactory(strict_enum=strict_enum)
|
|
90
104
|
content_builder = ContentBuilder(schema_factory, strict_enum=strict_enum)
|
|
91
105
|
header_builder = HeaderBuilder(schema_factory)
|
|
92
|
-
parameter_builder = ParameterBuilder(schema_factory)
|
|
106
|
+
parameter_builder = ParameterBuilder(schema_factory, content_builder)
|
|
93
107
|
schemas_builder = SchemasBuilder(schema_factory)
|
|
94
108
|
response_builder = ResponseBuilder(content_builder, header_builder)
|
|
95
109
|
request_builder = RequestBuilder(content_builder)
|
|
File without changes
|
|
@@ -152,7 +152,8 @@ class Object(Schema):
|
|
|
152
152
|
class Parameter:
|
|
153
153
|
name: str
|
|
154
154
|
location: ParameterLocation
|
|
155
|
-
schema: Schema
|
|
155
|
+
schema: Optional[Schema] = None
|
|
156
|
+
content: Optional[list['Content']] = None
|
|
156
157
|
required: Optional[bool] = field(default=False)
|
|
157
158
|
description: Optional[str] = None
|
|
158
159
|
# example: Optional[Any] # TODO
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
from .info import InfoBuilder
|
|
2
|
-
from .server import ServerBuilder
|
|
3
|
-
from .tag import TagBuilder
|
|
4
|
-
from .external_doc import ExternalDocBuilder
|
|
5
|
-
from .schema import SchemaFactory
|
|
6
|
-
from .parameter import ParameterBuilder
|
|
7
|
-
from .header import HeaderBuilder
|
|
8
|
-
from .content import ContentBuilder
|
|
9
|
-
from .request import RequestBuilder
|
|
10
|
-
from .response import ResponseBuilder
|
|
11
|
-
from .operation import OperationBuilder
|
|
12
|
-
from .path import PathBuilder
|
|
13
|
-
from .oauth_flow import OAuthFlowBuilder
|
|
14
|
-
from .security import SecurityBuilder
|
|
15
|
-
from .schemas import SchemasBuilder
|
|
16
|
-
|
|
17
|
-
__all__ = [
|
|
18
|
-
"InfoBuilder",
|
|
19
|
-
"ServerBuilder",
|
|
20
|
-
"TagBuilder",
|
|
21
|
-
"ExternalDocBuilder",
|
|
22
|
-
"SchemaFactory",
|
|
23
|
-
"ParameterBuilder",
|
|
24
|
-
"HeaderBuilder",
|
|
25
|
-
"ContentBuilder",
|
|
26
|
-
"RequestBuilder",
|
|
27
|
-
"ResponseBuilder",
|
|
28
|
-
"OperationBuilder",
|
|
29
|
-
"PathBuilder",
|
|
30
|
-
"OAuthFlowBuilder",
|
|
31
|
-
"SecurityBuilder",
|
|
32
|
-
"SchemasBuilder",
|
|
33
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi3_parser.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi3_parser.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openapi3_parser-1.1.19 → openapi3_parser-1.1.21}/src/openapi_parser/builders/external_doc.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|