Skip to content

Releases: IZIVIA/ocpi-toolkit

Version 1.0.0

02 Dec 15:53
124fdfc

Choose a tag to compare

What's Changed

Potential breaking changes

  • #179: OcpiException are thrown when parsing http error response that are properly formatted according to the OCPI spec. Before, HttpException were systematically thrown in this case

Full Changelog: R-0.0.57...R-1.0.0

Version 0.0.57

17 Nov 09:23
229d404

Choose a tag to compare

What's Changed

Full Changelog: R-0.0.56...R-0.0.57

Version 0.0.56

25 Oct 16:23
57bf439

Choose a tag to compare

What's Changed

Detailed migration guide here: https://github.com/IZIVIA/ocpi-toolkit/releases/tag/R-0.0.55

Full Changelog: R-0.0.55...R-0.0.56

Version 0.0.55

22 Oct 17:55
5035a39

Choose a tag to compare

What's Changed

Migration guide

To keep the same behavior as before (after merging this), add:

// runtimeClasspath is enough, you probably should not need it directly in your code
// if it's the case, it either means our API has flaws (you can open an issue if it's
// the case) or because you are not using the right `OcpiSerializer` method for your
// use case (see below)
runtimeClasspath("com.izivia:ocpi-2-2-1-jackson:<version>")

And mapper package changed

import com.izivia.ocpi.toolkit.common.mapper // before
import com.izivia.ocpi.toolkit.serialization.mapper // after

And its functions changed, because it's generic now

// before
mapper.writeValueAsString(value)
// after
import com.izivia.ocpi.toolkit.serialization.serialize
mapper.serializeObject(value)
// or
mapper.serializeList(value)

// before
mapper.writeValueAsString(value, class)
// after
mapper.serializeObject(value, class) 
// or
mapper.serializeList(value, class) 

// before
mapper.readValue(value, class)
// after
mapper.deserializeObject(value, class) 
// or
mapper.deserializeList(value, class) 

// before
mapper.readValue<XX>(value)
// after
mapper.deserializeObject<XX>(value) 
// or
mapper.deserializeList<XX>(value) 

// before
mapper.readValue<XX>(value, jacksonTypeDef)
// after
import com.izivia.ocpi.toolkit.serialization.serialize
mapper.deserializeOcpiResponse<XX>(value) // use the right specific method

Otherwise, no breaking change is expected. The mapper behavior stays the same.

If you want to use your own mapper (serializer implementation)

Add a file in: META-INF/services/com.izivia.ocpi.toolkit.serialization.OcpiSerializer specifying where your OcpiSerializer implementation is located, and don't import com.izivia:ocpi-2-2-1-jackson

Want to use kotlinx.serialization ?

You can now with

// runtimeClasspath is enough, you probably should not need it directly in your code
// if it's the case, it either means our API has flaws (you can open an issue if it's
// the case) or because you are not using the right `OcpiSerializer` method for your
// use case (see below)
runtimeClasspath("com.izivia:ocpi-2-2-1-kotlinx-serialization:<version>")

Full Changelog: R-0.0.54...R-0.0.55

Version 0.0.54

16 Sep 13:24
e2f1050

Choose a tag to compare

What's Changed

  • fix(locations): migrate remaining location tests by @atschabu in #166
  • fix(commands): fix deserialization and client interface by @atschabu in #167

Full Changelog: R-0.0.53...R-0.0.54

Version 0.0.53

25 Aug 13:57
b50c509

Choose a tag to compare

What's Changed

  • chore(api): remove OcpiResponseBody from service layer by @atschabu in #161
  • fix(cdrs) #162: allow negative total cost in credit CDR by @atschabu in #163
  • feat(location) #158: allow invalid enum values during deserialization by @atschabu in #164
  • feat(client) #158: handle invalid entries in SearchResult by @atschabu in #165

Full Changelog: R-0.0.52...R-0.0.53

Version 0.0.52

11 Jul 07:28

Choose a tag to compare

What's Changed

Full Changelog: R-0.0.51...R-0.0.52

Version 0.0.51

30 Jun 09:40
5ef3044

Choose a tag to compare

What's Changed

Full Changelog: R-0.0.50...R-0.0.51

Version 0.0.50

30 Jun 08:14
f2fd134

Choose a tag to compare

What's Changed

  • fix expected return value for data modules by @atschabu in #154

Full Changelog: R-0.0.49...R-0.0.50

Version 0.0.49

05 Mar 17:18
7007563

Choose a tag to compare

What's Changed

  • fix(mapper): Datetime (instant) parsing was not working if Z was present at the end & added Z at the end for better compat by @lilgallon in #152

Instant serializing is the same as 0.0.47 (Z at the end of datetimes), and deserializer can parse datetimes without "Z"

Full Changelog: R-0.0.48...R-0.0.49