An added webhook field is a compatibility question governed by the event contract. Permit documented optional extensions, but give missing required data, invalid types and unsupported versions explicit handling paths.
Start with a fictional event
The fields event_id, message_id, status and region_hint below are teaching examples, not this site’s interface. The new event adds region_hint to three original fields. A handler using only the original fields can accept that extension only under the applicable contract.
{
"event_id": "example-event-001",
"message_id": "example-message-001",
"status": "received",
"region_hint": "example-region"
}
Declare required data and extension behavior
This illustrative JSON Schema requires three fields, restricts status and explicitly permits additional properties. Replace the fictional names and values with the real service specification before implementation.
{
"type": "object",
"properties": {
"event_id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"status": {
"enum": [
"received",
"failed"
]
}
},
"required": [
"event_id",
"message_id",
"status"
],
"additionalProperties": true
}properties describes named fields, required makes fields mandatory, and additionalProperties defines treatment of undeclared properties. Setting it to false rejects an undeclared field; true permits extensions. Different contracts can therefore give the same added field different validation outcomes.
JSON Schema official object reference
Define an expected result for each change
| Change | Illustrative result |
|---|---|
| Add region_hint | Accept structure and read only validated known fields |
| Remove message_id | Reject missing required data |
| Make event_id an object | Reject incorrect type |
| Use another status value | Reject unsupported enum value |
| Provider announces a new version | Compare the new contract before deciding compatibility |
Avoid assigning an entire external object into an internal business model. Select validated fields and separately apply the documented authentication, ownership and authorization checks. Structure validation concerns format rather than those permissions.

Exercise the deployed processing path
Keep fictional fixtures for the normal event, allowed extension, missing property, wrong type and unknown state. Run the serializer, validator and business handler together rather than merely checking that a schema file exists.
Test in isolation before a controlled deployment. Retain a redacted event reference and reason for unsupported inputs, using bounded handling rather than repeatedly retrying an event that cannot satisfy the contract.
