You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pydantic does not (yet) implement dependentRequired when generating a JSON schema.
Per our requirements, if a notification has a value for the CTA field, then an accompanying URL must also be defined.
Our pydantic model (NotificationSchema.py) already enforces the constraint (checking that URL exists if CTA exists). As long as JSON notifications are only generated by NotificationSchema.py, they should be valid.
The text was updated successfully, but these errors were encountered:
Pydantic does not (yet) implement
dependentRequired
when generating a JSON schema.Per our requirements, if a notification has a value for the
CTA
field, then an accompanyingURL
must also be defined.A workaround is to create a custom schema generator, but it may not be worth the effort.
Our pydantic model (
NotificationSchema.py
) already enforces the constraint (checking thatURL
exists ifCTA
exists). As long as JSON notifications are only generated byNotificationSchema.py
, they should be valid.The text was updated successfully, but these errors were encountered: