OCPI Backward compatibility: 2.1.1
This issue will be used to track progress on achieving backward compatibility for OCPI version 2.1.1
Depends on #15
Hi @YuriyDurov, How are you? Were you able to figure out a solution to support objects of different OCPI versions, when the object properties names haven't changed, but the property types did changed? For example, on https://github.com/BitzArt/OCPI.Net/blob/main/src/OCPI.Net.Contracts/Session/OcpiSession.cs, "TotalCost" property type changed between 2.1.1 and 2.2.1 versions, but the property name didn't, hence the object can't be used for OCPI 2.1.1 version, only for 2.2.1 version. Would be happy to hear your thoughts on this.
Regards, Lior
Hello @LiorBenAri This can probably be solved by having two properties having the same json property name. So that either one can be used. Maybe a custom JsonConverter would also be required. Luckily, there shouldn't be too many cases like that.
@YuriyDurov , @LiorBenAri , Hi, Just for your information: I had a go at this here: https://github.com/clouTrix/OCPI.Net (currently applied only on OcpiSession, OcpiLocation and OcpiCredentials objects).
Remarks, suggestions and improvements are always welcome ...
@duke-bartholomew
Thanks for the heads up!
Any advancements will definitely be welcome here.
I am not able to dedicate much time to this project lately due to having to deal with other concerns.