Hi there, I’m confused about how Prefect renders P...
# best-practices
n
Hi there, I’m confused about how Prefect renders Pydantic Models in the Deployment’s UI. I have this code:
Copy code
@flow(name='test')
def my_flow(
    project_id: str,
    configuration: Configuration
) -> dict:
  ...

class S3Bucket(BaseModel):
    name: str
    path: str

class Configuration(BaseModel):
    input: S3Bucket
    output: S3Bucket
    force_overwrite: bool = False
And this is rendered like this (Prefect Server 2.12.1):
So, it seems that when an attribute is a simple type, the attribute’s name is shown in the UI, otherwise the class name is used
I find this quite confusing: I use the same class for two different attributes, and from the UI, it is impossible to know which one is.
There is some flag or best practice I’m missing here?
Or this should be rendered different by Prefect UI?