openapi
openapi copied to clipboard
Request: Split `period` into two types
It would be nice if period was split up into two types, one might be called period and the the other closed_period.
This would allow us to differentiate between :
- periods where start and end might be null and therefore possibly open-ended. This one maps to the current
periodtype. - periods that always have a start and end date (not nullable), we could call this one
closed_period. Many instances of the existing period type could be moved into this type.
Right now, null-checking on periods is super annoying, even when I can reasonable assume those values will not be null. However, making assumptions is a bad idea, so this should be represented by concrete types that explicitly delineate when the period is definitely closed, and the start and end non-null.