Releases: tkaczmarzyk/specification-arg-resolver
Releases · tkaczmarzyk/specification-arg-resolver
v3.1.0
v2.19.0
Changelog:
-
Json body parameters no longer throws when:
- Content-type is omitted
- Content-type is any other than application/json
This means that empty request body is accepted when json paths are present in specifications.
v3.0.1
Changelog:
- Fixed a bug related to specifications that always returned all available values. Fixed specs:
InThePast
InTheFuture
v2.18.1
- Fixed a bug related to specifications that always returned all available values. Fixed specs:
InThePast
InTheFuture
v3.0.0
Changelog:
- Migrated project to spring boot 3.0 and java 17
- Spring boot 3.0 is based on Hibernate version 6.X because in this version of hibernate all query results are distinct by default. This shouldn't affect most projects, but please be extra careful if you've ever used a spec with the
distinct=false
attribute.
- Spring boot 3.0 is based on Hibernate version 6.X because in this version of hibernate all query results are distinct by default. This shouldn't affect most projects, but please be extra careful if you've ever used a spec with the
- Added support for spring native-image.
- Specification-arg-resolver can be used in GraalVM native images, but it requires several additional configuration steps. This is due to the fact that this library relies on Java reflection heavily. Please see README_native_image.md for the details
- Modified Springdoc-openapi dependency to be compatible with spring boot 3.0
- Refactored
IsMember
,IsNotMember
specifications - they no longer use reflection explicitly. - changed default join type in
@Join
fromINNER
toLEFT
. I.e. if you have been using@Join
with default join type:Then, if you want to keep INNER join behaviour, you need to make it explicit (otherwise it will be LEFT):@Join(path="addresses", alias="a")
@Join(path="addresses", alias="a", type=JoinType.INNER)
- Changed join lazy evaluation:
- Inner joins are now evaluated even if there is no filtering applied on the joined part due to a missing HTTP param (as inner join may narrow down query results)
- For non-distinct queries, all joins are now evaluated eagerly (even if there is no filtering applied on the joined part). Reminder for Hibernate users: from Hibernate 6 onwards, all queries are distinct anyway
- in all other situations, left and right joins are not evaluated unless there is filtering on the joined part (and the corresponding HTTP param is present)
- Removed all deprecated items, including:
DateAfter
,DateAfterInclusive
,DateBefore
,DateBeforeInclusive
- useGreaterThan
,GreaterThanOrEqual
,LessThan
orLessThanOrEqual
DateBetween
- useBetween
EqualEnum
- useEqual
@Joins
container annotation - use repeated@Join
and@JoinFetch
v2.18.0
Changelog:
IsNull
specification is no longer deprecated- Introduced
IsNotNull
specification.
v2.17.0
Changelog:
- Introduced converter for
char
primitive andCharacter
class - Introduced new specifications:
isEmpty
,isNotEmpty
- these specifications filter out elements that have empty (not empty) collection of elements, that is defined underpath
in@Spec
annotation.Empty
- this specification filters for collections usingis empty
oris not empty
, depending on the value of the parameter passed in (e.g.where customer.orders is empty
).NotEmpty
- it is a negation forEmpty
specification.isTrue
,isFalse
- these specifications filter withtrue
/false
value of particular field defined underpath
in@Spec
annotation.True
- this specification filters usingtrue
orfalse
for a boolean type field, depending on the value of the parameter passed in.False
- it is a negation forTrue
specification.isMember
,isNotMember
- checks if the value passed as HTTP parameter is a member of a collection attribute of an entity (defined underpath
in@Spec
annotation).
v2.16.0
Changelog:
- Introduced
EqualDay
specification which allows finding all records within particular date (day), ignoring time. - Added ability to set custom
Locale
during resolver registration:This matters for case-insensitive specifications (@Override public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { argumentResolvers.add(new SpecificationArgumentResolver(new Locale("pl", "PL"))); // pl_PL will be used as the default locale }
EqualIgnoreCase
,NotEqualIgnoreCase
,LikeIgnoreCase
,StartingWithIgnoreCase
andEndingWithIgnoreCase
) which used system default locale in previous versions of the library. If locale is not provided, then system default will be used (exactly as in the previous version). - Added ability to set custom
Locale
in@Spec.config
(this overrides the global default mentioned above):@Spec(path = "name", spec = EqualIgnoreCase.class, config = "tr_TR")
- Introduced new case-insensitive specification
NotLikeIgnoreCase
that works in similar way asLikeIgnoreCase
but is its negation. - introduced
missingPathVarPolicy
to@Spec
annotation with available values:IGNORE
andEXCEPTION
(default). New policy is intended to configure behaviour on missing path variable.- for more details please check out section
Support for multiple paths with path variables
inREADME.md
.
- for more details please check out section
- additional Javadocs
v2.15.1
Changelog:
- updated spring-boot-dependencies to 2.7.7
- fixed potential issue with detecting non-emmpty HTTP headers
- fixed redundant proxy creation for multi-spec specifications when expected type is not a spec-interface