Guglielmo Colombo 0215d42326
fix: use proto default values in generated a2a_types.ts (#303)
# Description

This PR standardizes the handling of optional fields in the generated
a2a_types and converters. It aligns the codebase with Protobuf standards
by replacing undefined checks with empty string checks for missing
string values.

**Key Changes**
- Generated Types (a2a_types.ts):
  - Removed the optionality from generated string fields.
- Updated fromJSON and toJSON methods to validate against empty strings
("") instead of undefined for missing values.

- Converters:
- ToProto: Updated to convert undefined domain fields into empty
strings, ensuring compliance with the new non-optional proto types.
- FromProto: Updated to convert empty strings from the proto layer back
into undefined, preserving the existing undefined semantics for the
internal domain model.

**Motivation**
These changes ensure consistency with the Protobuf specification, where
missing strings must default to the empty string rather than undefined.
2026-01-20 09:52:15 +01:00
..