Skip to content

use jsonschema in additonal_fields of events

Johannes Zumthurm requested to merge additional_fields_json_schema into master

Created by: hermannsblum

This PR fixes #158 (closed) and #91 (closed), aswell as a minor bug in some event-validator.

Debatable: json-schema are more complex than cerberus-schema. I now require the user to specify a full json-schema for additional_fields, while ensuring in the validator that the following fields are always set accordingly:

{
       "$schema": "http://json-schema.org/draft-04/schema#",
       "type": "object",
       "additionalProperties": False
}

This is necessary to ensure that additional_fields specifies a dict and not a list (which makes it easier for an UI to create an understandable, dynamic form for these fields), aswell as to ensure the correct usage of json-schema to our purposes. One could also overwrite this api-side, but it would be instransparent to let somebody submit a non-complete json-schema and add or overwrite values.

Merge request reports

Loading