telegram-feedback-bot
telegram-feedback-bot copied to clipboard
Fix optional default values
pydantic 2.11 validator fails when optional configuration parameters are not defined in config file:
pydantic_core._pydantic_core.ValidationError: 3 validation errors for Settings
webhook_domain
Field required [type=missing, input_value={'bot_token': 'xxxxxxxxxx...nt_confirmation': 'yes'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
webhook_path
Field required [type=missing, input_value={'bot_token': 'xxxxxxxxxx...nt_confirmation': 'yes'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
custom_bot_api
Field required [type=missing, input_value={'bot_token': 'xxxxxxxxxx...nt_confirmation': 'yes'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.11/v/missing
In pydantic 2.x optional fields must have default value, otherwise they are treated as required. None seems to work fine.