apexdevkit 1.3.14__tar.gz → 1.3.15__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.
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/PKG-INFO +1 -1
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/router.py +12 -2
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/testing/rest.py +2 -2
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/pyproject.toml +1 -1
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/LICENSE +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/README.md +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/__init__.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/annotation/__init__.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/annotation/deprecate.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/error.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/__init__.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/builder.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/dependable.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/docs.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/response.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/schema.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/fastapi/service.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/http/__init__.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/http/fake.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/http/fluent.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/http/httpx.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/http/json.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/http/url.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/py.typed +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/repository/__init__.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/repository/connector.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/repository/database.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/repository/in_memory.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/repository/interface.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/testing/__init__.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/testing/database.py +0 -0
- {apexdevkit-1.3.14 → apexdevkit-1.3.15}/apexdevkit/testing/fake.py +0 -0
|
@@ -176,7 +176,12 @@ class RestfulRouter:
|
|
|
176
176
|
include_in_schema=is_documented,
|
|
177
177
|
)
|
|
178
178
|
def create_one(parent_id: parent_id_type, item: item_type) -> _Response:
|
|
179
|
-
|
|
179
|
+
try:
|
|
180
|
+
service = self.infra.service_for(parent_id)
|
|
181
|
+
except DoesNotExistError as e:
|
|
182
|
+
return JSONResponse(
|
|
183
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
184
|
+
)
|
|
180
185
|
|
|
181
186
|
try:
|
|
182
187
|
item = service.create_one(item)
|
|
@@ -206,7 +211,12 @@ class RestfulRouter:
|
|
|
206
211
|
include_in_schema=is_documented,
|
|
207
212
|
)
|
|
208
213
|
def create_many(parent_id: parent_id_type, items: collection_type) -> _Response:
|
|
209
|
-
|
|
214
|
+
try:
|
|
215
|
+
service = self.infra.service_for(parent_id)
|
|
216
|
+
except DoesNotExistError as e:
|
|
217
|
+
return JSONResponse(
|
|
218
|
+
RestfulResponse(RestfulName(self.parent)).not_found(e), 404
|
|
219
|
+
)
|
|
210
220
|
|
|
211
221
|
try:
|
|
212
222
|
return self.response.created_many(service.create_many(items))
|
|
@@ -261,7 +261,7 @@ class RestResponse:
|
|
|
261
261
|
return self.with_message(value)
|
|
262
262
|
|
|
263
263
|
def with_message(self, value: str) -> Self:
|
|
264
|
-
assert self.json.value_of("error").to(dict) == {"message": value}
|
|
264
|
+
assert self.json.value_of("error").to(dict) == {"message": value}, self.json
|
|
265
265
|
|
|
266
266
|
return self
|
|
267
267
|
|
|
@@ -310,6 +310,6 @@ class RestResponse:
|
|
|
310
310
|
return self.with_data()
|
|
311
311
|
|
|
312
312
|
def with_data(self, **kwargs: Any) -> Self:
|
|
313
|
-
assert self.json.value_of("data").to(dict) == {**kwargs}
|
|
313
|
+
assert self.json.value_of("data").to(dict) == {**kwargs}, self.json
|
|
314
314
|
|
|
315
315
|
return self
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|