File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,19 @@ class ContentSerdes {
140140 }
141141
142142 void _validateValue (Object ? value, DataSchema ? dataSchema) {
143- final dataSchemaJson = dataSchema? .rawJson;
144- if (dataSchemaJson == null ) {
143+ // TODO(JKRhb): The process of validating values according to a dataschema
144+ // needs to be reworked.
145+ const filteredKeys = ['uriVariables' ];
146+
147+ final filteredDataSchemaJson = dataSchema? .rawJson? .entries
148+ .where ((element) => ! filteredKeys.contains (element.key));
149+ if (filteredDataSchemaJson == null ) {
145150 return ;
146151 }
147- final schema =
148- JsonSchema .create (dataSchemaJson, schemaVersion: SchemaVersion .draft7);
152+ final schema = JsonSchema .create (
153+ Map .fromEntries (filteredDataSchemaJson),
154+ schemaVersion: SchemaVersion .draft7,
155+ );
149156 if (! schema.validate (value).isValid) {
150157 throw ContentSerdesException ('JSON Schema validation failed.' );
151158 }
You can’t perform that action at this time.
0 commit comments