alanlau28 commented on PR #23457:
URL: https://github.com/apache/kafka/pull/23457#issuecomment-5685231226

   Thanks for the review @AndrewJSchofield !
   Addressed the comments above on wording changes.
   Also addressed the assymetric validation: a non-flexible message version 
mapped to a flexible header is now rejected too.
   
   The checks, `MessageSpec.checkHeaderVersions(...)`, is invoked as a 
validation pass in `MessageGenerator.processDirectories(...)`, after every 
schema in the directory is parsed but before any code is generated. While it is 
in `MessageGenerator`, it can't run in the `MessageSpec` constructor because it 
needs the `RequestHeader`/`ResponseHeader` schemas to know which header 
versions exist and which are flexible. Each file is parsed in isolation, those 
bounds are only known once the whole directory has been parsed. 
   


-- 
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