openapi3-parser 1.1.17__tar.gz → 1.1.19__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.17 → openapi3_parser-1.1.19}/PKG-INFO +1 -1
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/PKG-INFO +1 -1
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/__init__.py +1 -1
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/content.py +8 -4
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/enumeration.py +1 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/specification.py +2 -2
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/license.txt +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/setup.cfg +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/setup.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/SOURCES.txt +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/dependency_links.txt +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/requires.txt +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/top_level.txt +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/__init__.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/common.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/external_doc.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/header.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/info.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/oauth_flow.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/operation.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/parameter.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/path.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/request.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/response.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/schema.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/schemas.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/security.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/server.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/builders/tag.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/errors.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/loose_types.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/parser.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/py.typed +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi_parser/resolver.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/tests/test_enumeration.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/tests/test_parser.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/tests/test_parser_options.py +0 -0
- {openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/tests/test_runner.py +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import Type, Union
|
|
2
|
+
from typing import Type, Union, Any
|
|
3
3
|
|
|
4
4
|
from . import SchemaFactory
|
|
5
5
|
from ..enumeration import ContentType
|
|
@@ -21,15 +21,19 @@ class ContentBuilder:
|
|
|
21
21
|
|
|
22
22
|
def build_list(self, data: dict) -> list[Content]:
|
|
23
23
|
return [
|
|
24
|
-
self._create_content(content_type, content_value
|
|
24
|
+
self._create_content(content_type, content_value.get('schema', {}),
|
|
25
|
+
content_value.get('example', None),
|
|
26
|
+
content_value.get('examples', {}))
|
|
25
27
|
for content_type, content_value
|
|
26
28
|
in data.items()
|
|
27
29
|
]
|
|
28
30
|
|
|
29
|
-
def _create_content(self, content_type: str,
|
|
31
|
+
def _create_content(self, content_type: str, schema: dict, example: Any, examples: dict) -> Content:
|
|
30
32
|
logger.debug(f"Content building [type={content_type}]")
|
|
31
33
|
ContentTypeCls: ContentTypeType = ContentType if self.strict_enum else LooseContentType
|
|
32
34
|
return Content(
|
|
33
35
|
type=ContentTypeCls(content_type),
|
|
34
|
-
schema=self.schema_factory.create(
|
|
36
|
+
schema=self.schema_factory.create(schema),
|
|
37
|
+
example=example,
|
|
38
|
+
examples=examples
|
|
35
39
|
)
|
|
@@ -168,8 +168,8 @@ class Parameter:
|
|
|
168
168
|
class Content:
|
|
169
169
|
type: Union[ContentType, LooseContentType]
|
|
170
170
|
schema: Schema
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
example: Optional[Any] = None
|
|
172
|
+
examples: dict[str, Any] = field(default_factory=dict)
|
|
173
173
|
# encoding: dict[str, Encoding] # TODO
|
|
174
174
|
|
|
175
175
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/src/openapi3_parser.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openapi3-parser-1.1.17 → openapi3_parser-1.1.19}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|