validate_data
Validate a JSON payload against the schema of a specific Smart Data Model. Use this when the user has an IoT payload or NGSI-LD entity and wants to check if it conforms to the standard. Returns a structured result with pass/fail and a list of specific validation errors if any. Example: validate_data({"model_name": "WeatherObserved", "data": {"id": "urn:ngsi-ld:WeatherObserved:001", "type": "WeatherObserved", "temperature": {"type": "Property", "value": 22.3}}})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The JSON object to validate. Accepts both NGSI-LD normalized format (with type/value wrappers) and key-values format. | |
| strict | No | Strict validation mode — disallows additional properties (default: false) | |
| model_name | Yes | The exact data model name to validate against — e.g., 'WeatherObserved' |