DEV: Validate objects when updating typed objects theme settings (#25902)

Why this change?

This change ensures that we validate the value of the new objects
when updating typed objects theme settings.
This commit is contained in:
Alan Guo Xiang Tan
2024-02-28 10:33:22 +08:00
committed by GitHub
parent 42d203d773
commit afb0adf48d
4 changed files with 75 additions and 26 deletions

View File

@ -61,7 +61,7 @@ class ThemeSettingsObjectValidator
end
def initialize(schema:, object:, json_pointer_prefix: "", errors: {}, valid_ids_lookup: {})
@object = object
@object = object.with_indifferent_access
@schema_name = schema[:name]
@properties = schema[:properties]
@errors = errors