Welcome to the Python screen.
The question is on your right: Validate Nested Vehicle State JSON. Read through the requirements first.
Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?
Given a JSON-like Python object payload and a schema object schema, implement a function that validates whether the payload matches the schema. The validator must support nested objects, arrays, required fields, primitive types (string, number, boolean), allowed enum values, and numeric min/max bounds. Return a list of validation errors, where each error includes the full field path and the reason. If the payload is valid, return an empty list.
def validate_vehicle_state(payload, schema):