Skip to content

Releases: tkaczmarzyk/specification-arg-resolver

v3.1.0

19 May 15:20
Compare
Choose a tag to compare

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.

v2.19.0

19 May 15:14
Compare
Choose a tag to compare

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

27 Jan 08:56
Compare
Choose a tag to compare

Changelog:

  • Fixed a bug related to specifications that always returned all available values. Fixed specs:
    • InThePast
    • InTheFuture

v2.18.1

27 Jan 08:55
Compare
Choose a tag to compare
  • Fixed a bug related to specifications that always returned all available values. Fixed specs:
    • InThePast
    • InTheFuture

v3.0.0

19 Jan 13:14
Compare
Choose a tag to compare

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.
  • 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 from INNER to LEFT. I.e. if you have been using @Join with default join type:
    @Join(path="addresses", alias="a")
    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", 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 - use GreaterThan, GreaterThanOrEqual, LessThan or LessThanOrEqual
    • DateBetween - use Between
    • EqualEnum - use Equal
    • @Joins container annotation - use repeated @Join and @JoinFetch

v2.18.0

19 Jan 12:23
Compare
Choose a tag to compare

Changelog:

  • IsNull specification is no longer deprecated
  • Introduced IsNotNull specification.

v2.17.0

16 Jan 15:49
Compare
Choose a tag to compare

Changelog:

  • Introduced converter for char primitive and Character class
  • Introduced new specifications:
    • isEmpty, isNotEmpty - these specifications filter out elements that have empty (not empty) collection of elements, that is defined under path in @Spec annotation.
    • Empty - this specification filters for collections using is empty or is not empty, depending on the value of the parameter passed in (e.g. where customer.orders is empty).
    • NotEmpty - it is a negation for Empty specification.
    • isTrue, isFalse - these specifications filter with true/false value of particular field defined under path in @Spec annotation.
    • True - this specification filters using true or false for a boolean type field, depending on the value of the parameter passed in.
    • False - it is a negation for True specification.
    • isMember, isNotMember - checks if the value passed as HTTP parameter is a member of a collection attribute of an entity (defined under path in @Spec annotation).

v2.16.0

05 Jan 16:14
Compare
Choose a tag to compare

Changelog:

  • Introduced EqualDay specification which allows finding all records within particular date (day), ignoring time.
  • Added ability to set custom Locale during resolver registration:
    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(new SpecificationArgumentResolver(new Locale("pl", "PL"))); // pl_PL will be used as the default locale
    }
    This matters for case-insensitive specifications (EqualIgnoreCase, NotEqualIgnoreCase, LikeIgnoreCase, StartingWithIgnoreCase and EndingWithIgnoreCase) 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 as LikeIgnoreCase but is its negation.
  • introduced missingPathVarPolicy to @Spec annotation with available values: IGNORE and EXCEPTION (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 in README.md.
  • additional Javadocs

v2.15.1

05 Jan 09:26
Compare
Choose a tag to compare

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