Skip to main content

add_pydantic_string_annotations

Add two numbers, but with string-annotated Pydantic models (future.annotations bug).

def add_pydantic_string_annotations(
data: AddParameterModel
) - > AddResultModel

Add two numbers, but with string-annotated Pydantic models (future.annotations bug).

Parameters​

NameTypeDescription
dataAddParameterModelA Pydantic model containing the two numeric values (x and y) to be added

Returns​

TypeDescription
AddResultModelA model containing the sum of the two input numbers stored in the result field