fastapi_client icon indicating copy to clipboard operation
fastapi_client copied to clipboard

Generator failing on class with Custom Root Type

Open agostof opened this issue 3 years ago • 0 comments

The models in the temporary work directory for several classes are empty and causes the generator to stop. The models in question are looking like:

class TraitNewRequest(BaseModel):

What I see in common for the models affected is that the server-side definition has a __root__ attribute (pydantic custom root type). They are defined as follows on the server-side:

class TraitNewRequest(BaseModel):
    __root__: TraitBaseClass

agostof avatar Jun 07 '21 02:06 agostof