transport-apis icon indicating copy to clipboard operation
transport-apis copied to clipboard

Follow Hafas' naming for the API version key

Open vkrause opened this issue 4 years ago • 5 comments

As per discussion in PR #7.

vkrause avatar Jan 24 '21 10:01 vkrause

Technically, this is a breaking change, but AFAIK no one uses transport-apis yet.

derhuerst avatar Jan 24 '21 12:01 derhuerst

Technically, this is a breaking change, but AFAIK no one uses transport-apis yet.

Valid point. While it is IMHO still too early to follow strict compatibility rules (we'd need some more content in here first), we probably should make it explicit when we want to start doing that. PR #7 and automatic JSON validation would seem like good prerequisites for that, at least for Hafas endpoints.

vkrause avatar Jan 24 '21 12:01 vkrause

So you're suggesting we should not just define and validate generic JSON attributes, but also endpoint-specific properties below options, and bump the version when those change?

derf avatar Feb 05 '21 18:02 derf

I think doing this is helpful, if it's not too detailed.

Validation or not, if we renamed version to ver, that would break clients depending on ver. This is why I consider it a breaking change. As @vkrause said though, at this state of the project, that is not relevant yet.

derhuerst avatar Feb 05 '21 19:02 derhuerst

Right, this case shows why we would want some validation for this as well. What I tried to do here is fix the current inconsistency between data and documentation regarding options.ver vs. options.version, something that would break client code relying on either one of those variants. As said elsewhere I don't care which variant we agree on, as long as it's consistent everywhere :)

vkrause avatar Feb 06 '21 08:02 vkrause