- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for sub_items (0.2 sec)
-
tests/test_validate_response_recursive/app_pv1.py
def get_recursive(): return {"name": "item", "sub_items": [{"name": "subitem", "sub_items": []}]} @app.get("/items/recursive-submodel", response_model=RecursiveItemViaSubmodel) def get_recursive_submodel(): return { "name": "item", "sub_items1": [ { "name": "subitem", "sub_items2": [ {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.1K bytes - Viewed (0) -
tests/test_validate_response_recursive/app_pv2.py
def get_recursive(): return {"name": "item", "sub_items": [{"name": "subitem", "sub_items": []}]} @app.get("/items/recursive-submodel", response_model=RecursiveItemViaSubmodel) def get_recursive_submodel(): return { "name": "item", "sub_items1": [ { "name": "subitem", "sub_items2": [ {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_validate_response_recursive/test_validate_response_recursive_pv1.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 900 bytes - Viewed (0) -
tests/test_validate_response_recursive/test_validate_response_recursive_pv2.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 900 bytes - Viewed (0) -
tests/test_dependency_duplicates.py
async def no_duplicates(item: Item, item2: Item = Depends(dependency)): return [item, item2] @app.post("/with-duplicates-sub") async def no_duplicates_sub( item: Item, sub_items: List[Item] = Depends(sub_duplicate_dependency) ): return [item, sub_items] def test_no_duplicates_invalid(): response = client.post("/no-duplicates", json={"item": {"data": "myitem"}}) assert response.status_code == 422, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 8.4K bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
from .utils import PYDANTIC_V2, needs_pydanticv2 class SubItem(BaseModel): subname: str sub_description: Optional[str] = None tags: List[str] = [] if PYDANTIC_V2: model_config = {"json_schema_serialization_defaults_required": True} class Item(BaseModel): name: str description: Optional[str] = None sub: Optional[SubItem] = None if PYDANTIC_V2:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 18.4K bytes - Viewed (2)