Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MyModel (0.04 sec)

  1. tests/test_arbitrary_types.py

            PlainSerializer(lambda v: v.data),
        ]
    
        class MyModel(BaseModel):
            model_config = ConfigDict(arbitrary_types_allowed=True)
            custom_field: FakeNumpyArrayPydantic
    
        app = FastAPI()
    
        @app.get("/")
        def test() -> MyModel:
            return MyModel(custom_field=FakeNumpyArray())
    
        client = TestClient(app)
        return client
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  2. tests/test_openapi_model_description_trim_on_formfeed.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class MyModel(BaseModel):
        """
        A model with a form feed character in the title.
        \f
        Text after form feed character.
        """
    
    
    @app.get("/foo")
    def foo(v: MyModel):  # pragma: no cover
        pass
    
    
    client = TestClient(app)
    
    
    def test_openapi():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Jun 17 07:46:27 UTC 2025
    - 660 bytes
    - Viewed (0)
Back to top