pvillard31 commented on PR #10890:
URL: https://github.com/apache/nifi/pull/10890#issuecomment-4185339337

   Thanks for looking into this @exceptionfactory - I agree that the coupling 
might not the best approach. Here's the alternative I'm considering:
   
   - Do not touch `RecordField` and `RecordSchema`.
   - `FieldValidator` and `RecordValidator` interfaces are simplified:
     - FieldValidator.validate(String fieldPath, Object value). The validator 
captures any field metadata it needs at construction time.
     - RecordValidator.validate(Record record, String fieldPath). Same idea.
   - A new SchemaValidators container (or similar name) holds the association 
between fields and their validators:
     - Map<String, List<FieldValidator>> mapping field paths to field-level 
validators
     - List<RecordValidator> for record-level validators
   - SchemaValidationContext is extended to optionally carry a SchemaValidators 
instance.
   - StandardSchemaValidator reads validators from its context, not from the 
schema or fields.
   
   Thoughts?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to