You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "pvillard31 (via GitHub)" <gi...@apache.org> on 2026/04/03 21:45:23 UTC

Re: [PR] NIFI-15587 - Add extensible FieldValidator and RecordValidator support to the Record API [nifi]

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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org