Commit 634b005
authored
Use pydantic in trigger service (#89)
* Use dict-like parameter mapping based on ChainMap rather than passing around an inner
function
* Declare pydantic models for all trigger service methods. These automatically handle
validation and type conversion from a dictionary-type mapping, e.g. using the
ChainMap-based approach above
* Use pydantic.validate_arguments decorator to enable automatic validation and conversion
to the pydantic model
This removes a lot of boiler plate type conversions (e.g. removes 11 x
bool(parameters("automatic"))) or parameter validation/error handling, and allows us to
clearly define up front exactly what message parameters a given trigger requires.1 parent 04512a5 commit 634b005
4 files changed
Lines changed: 590 additions & 435 deletions
0 commit comments