Skip to content

Commit

Permalink
✨ [#4980] Add schema definitions for user-defined variables
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorvanwijk committed Jan 10, 2025
1 parent 79cdf86 commit 9b9336f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/openforms/variables/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@ class DataMappingTypes(models.TextChoices):
FormVariableDataTypes.date: check_date,
FormVariableDataTypes.time: check_time,
}


FORM_VARIABLE_DATA_TYPE_TO_JSON_SCHEMA = {
FormVariableDataTypes.string: {"type": "string"},
FormVariableDataTypes.boolean: {"type": "boolean"},
FormVariableDataTypes.object: {"type": "object"},
FormVariableDataTypes.array: {"type": "array"},
FormVariableDataTypes.int: {"type": "integer"},
FormVariableDataTypes.float: {"type": "number"},
FormVariableDataTypes.datetime: {"type": "string", "format": "date-time"},
FormVariableDataTypes.date: {"type": "string", "format": "date"},
FormVariableDataTypes.time: {"type": "string", "format": "time"},
}

0 comments on commit 9b9336f

Please sign in to comment.