Paco Ibañez
01/10/2023, 5:54 PMparameter_openapi_schema
Zanie
01/10/2023, 5:58 PMPaco Ibañez
01/10/2023, 6:01 PMparameter_openapi_schema
returns the model properly, the prefect UI does not render the inner pydantic models. Any plans to render more complex models in the near future?
example:
CdpStepInput = TypeVar('CdpStepInput', bound=BaseModel)
CdpStepResultSpec = TypeVar('CdpStepResultSpec', bound=BaseModel)
class StepExecutionContext(GenericModel, Generic[CdpStepInput, CdpStepResultSpec]):
input: Optional[CdpStepInput]
result_spec: Optional[CdpStepResultSpec]
class InputParams(BaseModel):
csv_url: str = Field(None, description="the url of remote storage containing csv to load")
storage_config: Optional[SecretStr] = "{}" # json encoded dict with storage options
columns: Optional[List[str]] = None
class OuputSpec(BaseModel):
output_url: str = Field(None, description="the url to feather file containing loaded dataframe")
@flow
def step(request: StepExecutionContext[InputParams, OuputSpec]):
pass
Zanie
01/10/2023, 6:03 PMPaco Ibañez
01/10/2023, 6:04 PMZanie
01/10/2023, 6:06 PMPaco Ibañez
01/10/2023, 6:07 PMZanie
01/10/2023, 6:07 PM