from enum import Enum from pydantic import BaseModel class Operation(Enum): ADD = "add" SUBTRACT = "subtract" MULTIPLY = "multiply" DIVIDE = "divide" class CalculationRequest(BaseModel): operation: Operation x: float y: float