rust-transit / gtfs-structure

Read a GTFS file
MIT License
61 stars 32 forks source link

Add default values for route_short_name and route_long_name #134

Closed stefanw closed 1 year ago

stefanw commented 1 year ago

They are only 'conditionally required'.

Determining the 'requiredness' seems more a validation question and cannot be determined during deserialization.

Alternatively, they could be Option<String>s which is a more correct representation when the column is missing, but makes user code more complicated.

antoine-de commented 1 year ago

oups, forgot to reply to this, sorry :pray:

I feel we could enforce a bit more stuff on the type level here, but maybe you're right and it's overkill. I think we'll add a warning on the validator to enforce this :+1:

Thanks a lot!