Open kskalski opened 4 months ago
Do you see any practical difference between Optional and Conditionally Required fields?
It's up to the user to decide if conditions for optional fields to be present are met.
Use InputResponder::reject
https://github.com/ldanko/easyfix/blob/6b8cad4a79611c1faac53bccffa5a88c70397883/easyfix-session/src/application.rs#L58
(or just send Reject<3> message)
From what I see, requirements for conditional fields are not formally specified, so it's application specific and should generate runtime error when in application logic the rules violation is detected.
So my take on that is:
easyfix-dictionary
crate?), those fields might be good to mark as conditionally required, so user could treat them specially or at least know about them
From https://www.fixtrading.org/online-specification/introduction/#message-and-component-definitions Messages are comprised of required, optional and conditionally required (fields which are required based on the presence or value of other fields) fields. Systems should be designed to operate when only the required and conditionally required fields are present.
So they should just be treated as optional for the code gen part