cadwyn 3.1.1__py3-none-any.whl → 3.1.2__py3-none-any.whl
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.
Potentially problematic release.
This version of cadwyn might be problematic. Click here for more details.
- cadwyn/routing.py +5 -2
- {cadwyn-3.1.1.dist-info → cadwyn-3.1.2.dist-info}/METADATA +6 -1
- {cadwyn-3.1.1.dist-info → cadwyn-3.1.2.dist-info}/RECORD +6 -6
- {cadwyn-3.1.1.dist-info → cadwyn-3.1.2.dist-info}/LICENSE +0 -0
- {cadwyn-3.1.1.dist-info → cadwyn-3.1.2.dist-info}/WHEEL +0 -0
- {cadwyn-3.1.1.dist-info → cadwyn-3.1.2.dist-info}/entry_points.txt +0 -0
cadwyn/routing.py
CHANGED
|
@@ -120,8 +120,10 @@ class _EndpointTransformer(Generic[_R]):
|
|
|
120
120
|
]
|
|
121
121
|
|
|
122
122
|
def transform(self) -> dict[VersionDate, _R]:
|
|
123
|
+
schema_to_internal_request_body_representation = _extract_internal_request_schemas_from_router(
|
|
124
|
+
self.parent_router
|
|
125
|
+
)
|
|
123
126
|
router = deepcopy(self.parent_router)
|
|
124
|
-
schema_to_internal_request_body_representation = _extract_internal_request_schemas_from_router(router)
|
|
125
127
|
router_infos: dict[VersionDate, _RouterInfo] = {}
|
|
126
128
|
routes_with_migrated_requests = {}
|
|
127
129
|
route_bodies_with_migrated_requests: set[type[BaseModel]] = set()
|
|
@@ -178,11 +180,11 @@ class _EndpointTransformer(Generic[_R]):
|
|
|
178
180
|
template_older_body_model = None
|
|
179
181
|
_add_data_migrations_to_route(
|
|
180
182
|
older_route,
|
|
183
|
+
# NOTE: The fact that we use latest here assumes that the route can never change its response schema
|
|
181
184
|
latest_route,
|
|
182
185
|
template_older_body_model,
|
|
183
186
|
older_route.body_field.alias if older_route.body_field is not None else None,
|
|
184
187
|
copy_of_dependant,
|
|
185
|
-
# NOTE: The fact that we use latest here assumes that the route can never change its response schema
|
|
186
188
|
self.versions,
|
|
187
189
|
)
|
|
188
190
|
for _, router_info in router_infos.items():
|
|
@@ -355,6 +357,7 @@ def _extract_internal_request_schemas_from_router(
|
|
|
355
357
|
route.endpoint,
|
|
356
358
|
modify_annotations=_extract_internal_request_schemas_from_annotations,
|
|
357
359
|
)
|
|
360
|
+
_remake_endpoint_dependencies(route)
|
|
358
361
|
return schema_to_internal_request_body_representation
|
|
359
362
|
|
|
360
363
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cadwyn
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.2
|
|
4
4
|
Summary: Production-ready community-driven modern Stripe-like API versioning in FastAPI
|
|
5
5
|
Home-page: https://github.com/zmievsa/cadwyn
|
|
6
6
|
License: MIT
|
|
7
|
+
Keywords: python,api,json-schema,stripe,versioning,code-generation,hints,api-versioning,pydantic,fastapi,python310,python311,python312
|
|
7
8
|
Author: Stanislav Zmiev
|
|
8
9
|
Author-email: zmievsa@gmail.com
|
|
9
10
|
Requires-Python: >=3.10,<4.0
|
|
@@ -22,6 +23,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
24
25
|
Classifier: Programming Language :: Python :: 3
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
29
|
Classifier: Topic :: Internet
|
|
26
30
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
27
31
|
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
|
|
@@ -37,6 +41,7 @@ Requires-Dist: pydantic (>=1.0.0)
|
|
|
37
41
|
Requires-Dist: typer (>=0.7.0); extra == "cli"
|
|
38
42
|
Requires-Dist: typing-extensions
|
|
39
43
|
Requires-Dist: verselect (>=0.0.6)
|
|
44
|
+
Project-URL: Documentation, https://docs.cadwyn.dev
|
|
40
45
|
Project-URL: Repository, https://github.com/zmievsa/cadwyn
|
|
41
46
|
Description-Content-Type: text/markdown
|
|
42
47
|
|
|
@@ -18,7 +18,7 @@ cadwyn/codegen/_plugins/module_migrations.py,sha256=TeWJk4Iu4SRQ9K2iI3v3sCs1110j
|
|
|
18
18
|
cadwyn/exceptions.py,sha256=XOLsT4EH1uGNirmKlkgEk03PjUMtD7tgaCDadt_eBbE,695
|
|
19
19
|
cadwyn/main.py,sha256=_hC2Ke1uwtnjg2WueDXlg_QnzFgJbTcAlpHgqUBTmg4,4899
|
|
20
20
|
cadwyn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
cadwyn/routing.py,sha256=
|
|
21
|
+
cadwyn/routing.py,sha256=3H8GKT10wAYroAOCtGCNBMuA63SGAQSESze3EhBLwo0,34433
|
|
22
22
|
cadwyn/structure/__init__.py,sha256=BjFPlQYCw8ds_4zxdCi2LimarUGqSzyTNmOdT-FkGms,661
|
|
23
23
|
cadwyn/structure/common.py,sha256=6Z4nI97XPWTCinn6np73m-rLPyYNrz2fWXKJlqjsiaQ,269
|
|
24
24
|
cadwyn/structure/data.py,sha256=g9UmCkcdLJA8SlFMmYJIrBEuuIO8DNkhbfUHiOrYnds,5785
|
|
@@ -27,8 +27,8 @@ cadwyn/structure/enums.py,sha256=iMokxA2QYJ61SzyB-Pmuq3y7KL7-e6TsnjLVUaVZQnw,954
|
|
|
27
27
|
cadwyn/structure/modules.py,sha256=1FK-lLm-zOTXEvn-QtyBH38aDRht5PDQiZrOPCsBlM4,1268
|
|
28
28
|
cadwyn/structure/schemas.py,sha256=JmatYHXTaA8lZZcgctGtRyR_HDc-lUqyz8c8NhQgprU,6050
|
|
29
29
|
cadwyn/structure/versions.py,sha256=1dL46je599RiIpT7FlQDclwrzMjDJfWhlnL8pPovSdc,26309
|
|
30
|
-
cadwyn-3.1.
|
|
31
|
-
cadwyn-3.1.
|
|
32
|
-
cadwyn-3.1.
|
|
33
|
-
cadwyn-3.1.
|
|
34
|
-
cadwyn-3.1.
|
|
30
|
+
cadwyn-3.1.2.dist-info/entry_points.txt,sha256=eO05hLn9GoRzzpwT9GONPmXKsonjuMNssM2D2WHWKGk,46
|
|
31
|
+
cadwyn-3.1.2.dist-info/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
|
|
32
|
+
cadwyn-3.1.2.dist-info/WHEEL,sha256=vxFmldFsRN_Hx10GDvsdv1wroKq8r5Lzvjp6GZ4OO8c,88
|
|
33
|
+
cadwyn-3.1.2.dist-info/METADATA,sha256=hFJ6wmUPABzRsO9AxOnpxGaX4ZiKTVL_nw4d8W4ngUI,3972
|
|
34
|
+
cadwyn-3.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|