Help:Schema/Error handling

< Help:Schema
SchemaHelp:Schema/Error handling
Shows some schema validation errors caused by an inconsistent user input against a validation schema

There are two broad categories of errors that can occur within the smw/schema namespace:

  • JSON input error normally caused by some invalid syntax or incompatibilities with how the JSON should be structured
  • Schema validation error caused by inconsistencies with an assigned validation schema

Syntax error[edit]

The best and fastest method to produce a JSON compatible input is to use a online validation service or a JSON editor to check that the input document adheres the requirements to pass the JSON syntax check.

Validation error[edit]

A JSON validation schema can be assign to each schema type to help produce consistent schemata and eliminate maintenance effort during and after the input. A validation schema can be very strict on which properties, attributes and values are to be allowed or it can more lenient towards the user input.

If assigned, a validation schema defines its allowed properties together with the expected characteristics using the specification. The detection of errors and their description are produced by a specialized component that is not part of Semantic MediaWiki or MediaWiki and therefore appear in English and cannot be translated.