reflectapi-runtime 0.22.0__tar.gz → 0.22.1__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.
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/PKG-INFO +1 -1
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/pyproject.toml +1 -1
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/__init__.py +1 -1
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/partial.py +7 -6
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_partial.py +18 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/.gitignore +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/README.md +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/auth.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/batch.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/client.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/duration.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/exceptions.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/hypothesis_strategies.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/middleware.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/py.typed +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/response.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/serde.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/sse.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/streaming.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/testing.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/transport.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/types.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/__init__.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_auth.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_auth_negative_cases.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_batch.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_client.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_codegen_regressions.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_edge_cases.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_enhanced_features.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_enum_forward_compatibility.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_exceptions.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_middleware.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_pydantic_serialization.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_request_field_presence.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_response.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_response_header_presence.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_sse.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_streaming.py +0 -0
- {reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_testing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: reflectapi-runtime
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.1
|
|
4
4
|
Summary: Runtime library for ReflectAPI Python clients
|
|
5
5
|
Project-URL: Homepage, https://github.com/thepartly/reflectapi
|
|
6
6
|
Project-URL: Repository, https://github.com/thepartly/reflectapi
|
|
@@ -70,12 +70,13 @@ class ReflectapiPartialModel(BaseModel):
|
|
|
70
70
|
# ``m.snapshot = None`` after construction and have it land on the
|
|
71
71
|
# wire.
|
|
72
72
|
|
|
73
|
-
#
|
|
74
|
-
#
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
)
|
|
73
|
+
# Deliberately no return annotation and no ``return_type``: a declared
|
|
74
|
+
# ``dict[str, Any]`` replaces the model's serialization-mode JSON schema
|
|
75
|
+
# with a bare object, so consumers' OpenAPI specs lose the type. The
|
|
76
|
+
# missing annotation also keeps Pydantic 2.10 from resolving a postponed
|
|
77
|
+
# annotation in a subclass's module, which need not import ``Any``.
|
|
78
|
+
@model_serializer(mode="wrap")
|
|
79
|
+
def _serialize_partial(self, handler: Any, info: Any | None = None):
|
|
79
80
|
"""Drop fields the caller never explicitly set.
|
|
80
81
|
|
|
81
82
|
Pydantic populates ``model_fields_set`` with the *field names*
|
|
@@ -251,3 +251,21 @@ def test_partial_subclass_does_not_require_any_in_callers_module(monkeypatch):
|
|
|
251
251
|
assert caller.Request(required=None, optional=None).model_dump_json() == (
|
|
252
252
|
'{"required":null,"optional":null}'
|
|
253
253
|
)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
class TestJsonSchema:
|
|
257
|
+
"""The serializer must not hide the model from serialization-mode schemas."""
|
|
258
|
+
|
|
259
|
+
def test_serialization_schema_keeps_model_properties(self):
|
|
260
|
+
schema = PartialItem.model_json_schema(mode="serialization")
|
|
261
|
+
assert set(schema["properties"]) == {"identity", "snapshot"}
|
|
262
|
+
assert schema["required"] == ["identity"]
|
|
263
|
+
|
|
264
|
+
def test_serialization_schema_keeps_nested_partial_refs(self):
|
|
265
|
+
schema = PartialItem.model_json_schema(mode="serialization")
|
|
266
|
+
refs = json.dumps(schema["properties"]["snapshot"])
|
|
267
|
+
assert "PartialSnapshot" in refs
|
|
268
|
+
assert set(schema["$defs"]["PartialSnapshot"]["properties"]) == {
|
|
269
|
+
"name",
|
|
270
|
+
"description",
|
|
271
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/src/reflectapi_runtime/middleware.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
|
{reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_enum_forward_compatibility.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_pydantic_serialization.py
RENAMED
|
File without changes
|
{reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_request_field_presence.py
RENAMED
|
File without changes
|
|
File without changes
|
{reflectapi_runtime-0.22.0 → reflectapi_runtime-0.22.1}/tests/test_response_header_presence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|