Scrooge v22.3.0 Release Notes
-
๐ New Features
* scrooge-core: `c.t.scrooge.ThriftEnumObject.forEnumClass` API for retrieving `ThriftEnumObject` for a `ThriftEnum` class. ``PHAB_ID=D859929`` * scrooge-generator: for each method defined in a service in the Thrift IDL, if any request arg of a method has annotations started with `validation.`, in Java template, generate a new trait `ServerValidationMixin` with a new API `violationReturning<method_name>` which validates incoming request (of Struct, Union, Exception types) and return any violations (as method parameters `<request_variable>Violations`) back to the users in the method API. ``PHAB_ID=D840524`` ๐ฅ Breaking API Changes
scrooge-core:
ThriftUnion
is now defined to extendThriftStruct
. In practice, this is not a significant change as all Scrooge-generated classes that implementThriftUnion
also implementThriftStruct
. We just made the invariant that unions are always structs explicit in the type system.PHAB_IB=D854592
scrooge-core:
ThriftEnumObject
now has an additional method,annotations
. In practice, all Scrooge-generatedThriftEnumObject
implementations already had this member, it is now just made accessible as a strongly typed member on the trait.PHAB_IB=D859929
๐ scrooge-generator:
--import-path
option is now deleted due to deprecation. An alternative is to use the--include-path
option.PHAB_ID=D916638
โ Runtime Behavior Changes
* scrooge: Bump version of Jackson to 2.13.2. ``PHAB_ID=D848592``