Skip to content

[WORKFLOW SDK FEATURE REQUEST] Support pydantic models #858

@leechristensen

Description

@leechristensen

Describe the WORKFLOW SDK feature

It would be convenient if workflows/activities could support Pydantic models as input, automatically handling the (de)serializaiton. Right now, they only support dictionaries or simple values. The motivation comes from wanting to use strongly typed objects vs dictionaries (which are more opaque in their types).

There is some precedent here with the FastAPI extension supporting them in subscriptions.

acceptance criteria:

  • workflows/activities use pydantic models as their inputs
  • we still support dictionaries and can serialize dictionaries into pydantic models
  • dapr quickstarts are all updated
  • dapr docs are all updated

Release Note

RELEASE NOTE: feat: workflows and activities support Pydantic models as their inputs

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions