Finatra 20.3.0
Added
-
finatra-kafka-streams: Add method to
c.t.f.kafkastreams.test.TopologyTesterTopicto write
Kafka messages with custom headers to topics. a9fef3dc -
finatra-http: Add
toBufReaderto get the underlying Reader of Buf from StreamingResponse.
If the consumed Stream primitive is not Buf, the returned reader streams a serialized
JSON array. 876d0ba9 -
inject-app: Add functions to
c.t.inject.app.AbstractAppto provide better
ergonomics for Java users to call and use basicApplifecycle callbacks.
f04772df -
inject-server: Add functions to
c.t.inject.server.AbstractTwitterServerto provide
better ergonomics for Java users to call and use basicTwitterServerlifecycle
callbacks. f04772df -
inject-slf4j: Add a way to retrieve the currently stored Local Context map backing the
MDC. 12b9410e -
finatra-jackson: Added new functionality in the
CaseClassDeserializerto support more
Jackson annotations during deserialization. See documentation for more information.
49014890 -
finatra: Add NullKafkaProducer for unit tests to avoid network connection failures in the log.
d8d4d5db
Changed
-
finatra-validation|jackson: Remove Jackson dependency from finatra/validation. This
was forErrorCodereporting but can be moved to finatra/jackson. f024f929 -
finatra-kafka-streams: (BREAKING API CHANGE) Update AsyncTransformer to preserve
record context. be5dd08f -
finatra-jackson: Better handling of Scala enumeration mapping errors. Currently, if mapping
of a Scala enumeration during deserialization fails ajava.util.NoSuchElementExceptionis
thrown which escapes deserialization error handling. Update to instead handle this failure case
in order to correctly translate into aCaseClassFieldMappingExceptionwhich will be wrapped
into aCaseClassMappingException. 4753c6e8 -
finatra: Update Google Guice version to 4.2.0 76506c35
-
finatra: Bumped version of Joda to 2.10.2 and Joda-Convert to 1.5. 9adef421
-
finatra-jackson|finatra-http-annotations: Move http-releated Jackson "injectablevalues"
annotations fromfinatra/jacksontofinatra/http-annotations.Specifically the follow have changed packages,
c.t.finatra.request.QueryParam-->c.t.finatra.http.annotations.QueryParam
c.t.finatra.request.RouteParam-->c.t.finatra.http.annotations.RouteParam
c.t.finatra.request.FormParam-->c.t.finatra.http.annotations.FormParam
c.t.finatra.request.Header-->c.t.finatra.http.annotations.Header
c.t.finatra.request.JsonIgnoreBody-->c.t.finatra.http.annotations.JsonIgnoreBodyUsers should update from
finatra/jackson/src/main/java(finatra-jackson_2.12)
tofinatra/http-annotations/src/main/java(finatra-http-annotations_2.12).
77469e17 -
finatra-jackson: Updated Finatra Jackson integration to introduce a new
ScalaObjectMapper
and module to simplify configuration and creation of the mapper. See documentation for more
information. 49014890 -
finatra-jackson: (BREAKING API CHANGE) Moved the java binding annotations,
CamelCaseMapperand
SnakeCaseMapperfromc.t.finatra.annotationsinfinatra/jacksonto
c.t.finatra.json.annotationsinfinatra/json-annotations. Moved
c.t.finatra.response.JsonCamelCasetoc.t.finatra.json.annotations.JsonCamelCasewhich is also
now deprecated. Users are encouraged to use the standard Jackson annotations or a mapper with
the desired property naming strategy configured.Many exceptions for case class deserialization were meant to be internal to the framework but are
useful or necessary outside of the internals of JSON deserialization. As such we have cleaned up
and made most JSON deserialization exceptions public. As a result, all the exceptions have been moved
fromc.t.finatra.json.internal.caseclass.exceptionstoc.t.finatra.jackson.caseclass.exceptions.c.t.finatra.json.internal.caseclass.exceptions.CaseClassValidationExceptionhas been renamed to
c.t.finatra.jackson.caseclass.exceptions.CaseClassFieldMappingException.JsonInjectException,
JsonInjectionNotSupportedException, andRequestFieldInjectionNotSupportedExceptionhave all been
deleted and replaced withc.t.finatra.jackson.caseclass.exceptions.InjectableValuesException
which represents the same error cases.The
FinatraJsonMappingExceptionhas been removed. Users are encouraged to instead use the general
JacksonJsonMappingException(which theFinatraJsonMappingExceptionextends).RepeatedCommaSeparatedQueryParameterExceptionhas been moved tom finatra/http.
49014890
Fixed
-
finatra-jackson: Access to parameter names via Java reflection is not supported in Scala 2.11.
Added a work around for the parsing of case class structures to support JSON deserialization in
Scala 2.11 and forward. 59ec2c21 -
finatra-jackson: Fix for enforcing "fail on unknown properties" during deserialization. Previously,
theCaseClassDeserializerwas optimized to only read the fields in the case class constructor
from the incoming JSON and thus ignored any unknown fields during deserialization. The fix will
now properly fail if theDeserializationFeatureis set or if theJsonPropertiesis configured
accordingly. 49014890