Releases: IZIVIA/ocpi-toolkit
Version 1.0.0
What's Changed
- feat #174: add module tariff implementation by @atschabu in #180
- fix #179: centralize and fix HttpResponse parsing and error handling by @lilgallon in #181
Potential breaking changes
- #179:
OcpiExceptionare thrown when parsing http error response that are properly formatted according to the OCPI spec. Before,HttpExceptionwere systematically thrown in this case
Full Changelog: R-0.0.57...R-1.0.0
Version 0.0.57
What's Changed
Full Changelog: R-0.0.56...R-0.0.57
Version 0.0.56
What's Changed
- feat #170: kotlinx.serilization support by @lilgallon in #173
- fix: update setup-gradle version by @lilgallon in #177
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
What's Changed
- feat #171: bump libs & gradle & gh workflows by @lilgallon in #172
- feat #168: pluggable serialization support (with jackson for now) by @lilgallon in #169
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 // afterAnd 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 methodOtherwise, 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
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
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
Version 0.0.51
What's Changed
Full Changelog: R-0.0.50...R-0.0.51
Version 0.0.50
What's Changed
Full Changelog: R-0.0.49...R-0.0.50
Version 0.0.49
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