Skip to content

Latest commit

 

History

History
167 lines (104 loc) · 7.04 KB

CHANGELOG.md

File metadata and controls

167 lines (104 loc) · 7.04 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.11.0 - 2024-12-09

Added

  • Ktor integration to automatically validate received payloads. (#43)
  • Public constructors for ConstraintViolationSet and ConstraintViolation.

0.10.0 - 2024-09-24

Added

  • kotlinx-datetime integration to validate multiplatform date and time. (#42)
  • New akkurate-test artifact to test custom constraints.
  • New constraints to validate types of the kotlin.time package.

Fixed

  • Add a or equal to zero suffix to the default message for isNegativeOrZero and isPositiveOrZero constraints.

0.9.1 - 2024-09-12

Fixed

  • Fix name clashes when generating validatable accessors from the common code.

0.9.0 - 2024-08-30

⚠️ Breaking changes

Added

  • Support Kotlin Multiplatform and all its targets (#33)

Changed

  • The default violation message of the isInstanceOf and isNotInstanceOf constraints now display the simple name of the type, instead of the qualified one.
  • The Validate annotation has been moved from the akkurate-ksp-plugin artifact to the akkurate-core one.

Added

  • Support transforming a value before validating it (#26)
  • New constraint to ensure a collection doesn't contain duplicated elements (#28)
  • New constraints to check if a value is an instance of some type (#27)
  • New accessors to easily validate a specific index of a collection (#29)

⚠️ Breaking changes

Fixed

  • Accessors for mutable properties are no longer improperly cast. (#22)

0.6.0 - 2023-12-12

Added

  • Arrow integration to convert Akkurate validation results to typed errors (#20)

0.5.0 - 2023-11-28

Added

  • New configuration option to fail on the first constraint violation (#19)

0.4.0 - 2023-10-30

⚠️ Breaking changes

  • The Configuration class is now instantiated through a builder DSL (#13)
  • Mark the API of the KSP plugin as experimental (#13)
  • Remove unused MutablePath type alias

Added

  • Support iterating over nullable iterables, like Validatable<Iterable<*>?>. (#16)
  • Add constraints to validate additional JVM types: LocalDate, Duration and Period (#7)

0.3.0 - 2023-10-16

⚠️ Breaking changes

  • Validation accessors are generated only for public properties. (#11 #15)
  • Accessors are now generated for the properties of the implemented interface when possible, not for the implementation. (#11)

Added

  • Provide built-in accessors for kotlin and kotlin.collections packages (#11)
  • Support generating accessors for generic types (#10)
  • A KDoc is provided for each validatable accessor (#6)

Fixed

  • Validatable accessors are no longer generated for extension properties
  • Skip the generation of accessors in the kotlin package, avoiding compilation failures.

Changed

  • Propagate the @Validate annotation to the nested classes (#11)

0.2.0 - 2023-09-26

⚠️ Breaking changes

  • Change visibility of ValidateAnnotationProcessor.validatableOfFunction to private. (#12)
  • Change visibility of ValidateAnnotationProcessor.validatableClass to private. (#12)

Added

  • Add new constraints (#3):
    • CharSequence
      • hasLengthEqualTo / hasLengthNotEqualTo
      • isBlank / isNotBlank
      • isMatching / isNotMatching
    • kotlin.collections
      • hasSizeNotEqualTo
      • isEmpty / isNotEmpty
      • isContaining / isNotContaining
    • Map
      • isContainingKey / isNotContainingKey
      • isContainingValue / isNotContainingValue

Changed

0.1.1 - 2023-09-21

Fixed

  • The target version of generated JVM bytecode is now 1.8 instead of 11. (#5)
  • Suppress the warning about useless casts in generated accessors. (#8)

0.1.0 - 2023-09-12

First release