Closed twodayslate closed 4 years ago
Agree the library should validate those args, I know I didn't fully validate against the spec for all scenarios.
I'd love a PR :)
This is complete. I did not implement the float check. If you would like that please let me know.
From the specification:
There currently isn't any validation on
openc2.Args
. For example if all three are defined that would be out of specification. Should that be handled by this library or should the consumer handle those checks? Some make sense to have the consumer check the value/apply default values. I would also think an error should be thrown if stop_time is less than start_time tho. The "MUST" language isn't present in this section so it isn't clear on the desired behavior.Additionally, the three values above are defined as the following:
Currently if a float is given (i.e. 2.2) the value is valid (appears to be rounded down). Should this throw an error or is that acceptable behavior?
Lastly, the specification states that the integer must be positive.
I can create a PR for this depending on your answer if applicable.
Thanks