diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt index 2737c39cf0..b48d90e9e2 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt @@ -46,12 +46,12 @@ object CoreJvmCompiler { /** * The version used to in the build classpath. */ - const val dogfoodingVersion = "2.0.0-SNAPSHOT.050" + const val dogfoodingVersion = "2.0.0-SNAPSHOT.051" /** * The version to be used for integration tests. */ - const val version = "2.0.0-SNAPSHOT.050" + const val version = "2.0.0-SNAPSHOT.051" /** * The ID of the Gradle plugin. diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt index 271ccee000..1cad8b7403 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt @@ -36,7 +36,7 @@ object Validation { /** * The version of the Validation library artifacts. */ - const val version = "2.0.0-SNAPSHOT.392" + const val version = "2.0.0-SNAPSHOT.393" /** * The last version of Validation compatible with ProtoData. diff --git a/config b/config index dcd2cee3af..17e0dbb819 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit dcd2cee3af82ce8e4de407801636637f7cdcef3c +Subproject commit 17e0dbb819839d9b65b711efb085b38bcbb5eae9 diff --git a/dependencies.md b/dependencies.md index 9faee3fde2..6ec36ba3f3 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.tools:validation-context:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-context:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -1139,14 +1139,14 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-context-tests:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-context-tests:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -1731,14 +1731,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:51 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-gradle-plugin:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-gradle-plugin:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -2807,14 +2807,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-java:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-java:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -3901,14 +3901,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-java-bundle:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-java-bundle:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1. @@ -3971,14 +3971,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:51 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine:validation-jvm-runtime:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine:validation-jvm-runtime:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -4811,14 +4811,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-ksp:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-ksp:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1. @@ -5747,14 +5747,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-consumer:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-consumer:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -6345,14 +6345,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:51 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-consumer-dependency:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-consumer-dependency:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -6863,14 +6863,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-extensions:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-extensions:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -7554,14 +7554,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-runtime:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-runtime:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -8183,14 +8183,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-validating:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-validating:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -8855,14 +8855,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-validator:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-validator:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -9613,14 +9613,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:52 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-validator-dependency:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-validator-dependency:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -9890,14 +9890,14 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:51 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:validation-vanilla:2.0.0-SNAPSHOT.393` +# Dependencies of `io.spine.tools:validation-vanilla:2.0.0-SNAPSHOT.394` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -10248,6 +10248,6 @@ This report was generated on **Tue Jan 20 16:21:00 WET 2026** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Jan 20 16:21:00 WET 2026** using +This report was generated on **Tue Jan 20 19:55:51 WET 2026** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file diff --git a/docs/00-intro/index.md b/docs/00-intro/index.md index 542f713dac..85b897e3fc 100644 --- a/docs/00-intro/index.md +++ b/docs/00-intro/index.md @@ -3,8 +3,7 @@ Spine Validation is a Protobuf-centric validation framework that generates type-safe validation code directly from your `.proto` definitions. It allows you to describe constraints on fields, messages, and collections using -declarative options and then automatically enforces these constraints at -runtime. +declarative options and then automatically enforces these constraints at runtime. The library is part of the Spine toolchain but can also be used independently in any Java/Kotlin backend that models data using Protocol Buffers. diff --git a/docs/01-getting-started/index.md b/docs/01-getting-started/index.md index 9ed40dde89..57b8967ef0 100644 --- a/docs/01-getting-started/index.md +++ b/docs/01-getting-started/index.md @@ -1,6 +1,7 @@ # Getting Started -This section helps you set up Spine Validation, define your first validated Protobuf model, and see validation in action in Java and Kotlin. +This section helps you set up Spine Validation, define your first validated Protobuf model, +and see validation in action in Java and Kotlin. If you are new to the library, read the short overview first: - Introduction → [Overview](../00-intro/index.md) @@ -22,7 +23,9 @@ If you are new to the library, read the short overview first: - Protobuf compiler (`protoc`) - Optional: Kotlin 2.2.20+ for the Kotlin Protobuf DSL -If your project already generates Java/Kotlin sources from `.proto` files, you’re 90% there. Spine Validation integrates into the build to generate and inject validation logic into the code produced by `protoc`. +If your project already generates Java/Kotlin sources from `.proto` files, you’re 90% there. +Spine Validation integrates into the build to generate and inject validation logic into +the code produced by `protoc`. --- diff --git a/docs/ToC.md b/docs/ToC.md index 87515e2df0..4129c539cd 100644 --- a/docs/ToC.md +++ b/docs/ToC.md @@ -84,13 +84,8 @@ - [Cross-field Logic](07-recipes/cross-field-logic.md) - [API Validation](07-recipes/api-validation.md) -## 8. Migration Guide -- [Overview](08-migration/index.md) -- [Migrating from `spine.base` Validation](08-migration/from-spine-base.md) -- [Version Changes](08-migration/version-changes.md) - -## 9. Reference -- [Reference Overview](09-reference/index.md) -- [List of Validation Options](09-reference/options.md) -- [Java/Kotlin API Index](09-reference/api.md) -- [Glossary](09-reference/glossary.md) +## 8. Reference +- [Reference Overview](08-reference/index.md) +- [List of Validation Options](08-reference/options.md) +- [Java/Kotlin API Index](08-reference/api.md) +- [Glossary](08-reference/glossary.md) diff --git a/java/src/main/kotlin/io/spine/tools/validation/java/JavaValidationPlugin.kt b/java/src/main/kotlin/io/spine/tools/validation/java/JavaValidationPlugin.kt index fdd9c17afb..4187a6ce1c 100644 --- a/java/src/main/kotlin/io/spine/tools/validation/java/JavaValidationPlugin.kt +++ b/java/src/main/kotlin/io/spine/tools/validation/java/JavaValidationPlugin.kt @@ -71,9 +71,9 @@ private val customOptions: List by lazy { * Dynamically discovered instances of custom * [MessageValidator][io.spine.validation.MessageValidator]s. * - * Please note that the KSP module is responsible for the actual discovering - * of the message validators. The discovered validators are written to a text file - * in the KSP task output. This property loads the validators from that file. + * Note that the KSP module is responsible for the actual discovering of the message validators. + * The discovered validators are written to a text file in the KSP task output. + * This property loads the validators from that file. */ private val customValidators: Map by lazy { val workingDir = System.getProperty("user.dir") diff --git a/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceBytesField.kt b/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceBytesField.kt index 668383f1b6..b79a8940af 100644 --- a/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceBytesField.kt +++ b/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceBytesField.kt @@ -38,8 +38,7 @@ import io.spine.tools.psi.java.method /** * Renders Java code to support `(set_once)` option for the given byte array [field]. * - * Please note, in the generated Java code, Protobuf uses [ByteString] to represent - * an array of bytes. + * Note that Protobuf uses [ByteString] to represent an array of bytes in the generated code. * * @param field The byte array field that declared the option. * @param typeSystem The type system to resolve types. diff --git a/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceEnumField.kt b/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceEnumField.kt index 43361debc2..456deccdc6 100644 --- a/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceEnumField.kt +++ b/java/src/main/kotlin/io/spine/tools/validation/java/setonce/SetOnceEnumField.kt @@ -39,8 +39,7 @@ import io.spine.tools.psi.java.method /** * Renders Java code to support `(set_once)` option for the given enum [field]. * - * Please note, in the generated Java code, Protobuf uses an ordinal number - * to represent the currently set enum constant. + * Note that code generated by Protobuf uses an ordinal number to represent the currently set enum constant. * * @param field The enum field that declared the option. * @param typeSystem The type system to resolve types. diff --git a/jvm-runtime/src/main/kotlin/io/spine/validation/MessageValidator.kt b/jvm-runtime/src/main/kotlin/io/spine/validation/MessageValidator.kt index df147b202a..2b534fe50d 100644 --- a/jvm-runtime/src/main/kotlin/io/spine/validation/MessageValidator.kt +++ b/jvm-runtime/src/main/kotlin/io/spine/validation/MessageValidator.kt @@ -82,7 +82,7 @@ import io.spine.annotation.SPI * } * ``` * - * Please note that standalone instances of [M] and fields of [M] type that occur in + * Note that standalone instances of [M] and fields of [M] type that occur in * other external messages **will not be validated**. * * Consider the following example: diff --git a/pom.xml b/pom.xml index 8b9da9273d..5f619d86ff 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine.tools validation -2.0.0-SNAPSHOT.393 +2.0.0-SNAPSHOT.394 2015 @@ -62,7 +62,7 @@ all modules and does not describe the project structure per-subproject. io.spine spine-validation-jvm-runtime - 2.0.0-SNAPSHOT.392 + 2.0.0-SNAPSHOT.393 compile @@ -281,12 +281,12 @@ all modules and does not describe the project structure per-subproject. io.spine.tools core-jvm-gradle-plugins - 2.0.0-SNAPSHOT.050 + 2.0.0-SNAPSHOT.051 io.spine.tools core-jvm-routing - 2.0.0-SNAPSHOT.050 + 2.0.0-SNAPSHOT.051 io.spine.tools @@ -301,7 +301,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools validation-java-bundle - 2.0.0-SNAPSHOT.392 + 2.0.0-SNAPSHOT.393 net.sourceforge.pmd diff --git a/tests/consumer/src/test/kotlin/io/spine/validation/test/CurrencyOptionITest.kt b/tests/consumer/src/test/kotlin/io/spine/validation/test/CurrencyOptionITest.kt index 3d6d8250c7..6d9a5a57a2 100644 --- a/tests/consumer/src/test/kotlin/io/spine/validation/test/CurrencyOptionITest.kt +++ b/tests/consumer/src/test/kotlin/io/spine/validation/test/CurrencyOptionITest.kt @@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test * by [CurrencyOption] in the `:java-tests:extensions` module. * * The `extensions` module declares the `(currency)` message option, which is used by - * money data types in this module. Please see `main/proto/test/money.proto` for details. + * money data types in this module. See `main/proto/test/money.proto` for details. * * This test verifies that custom validation code works as expected. */ diff --git a/version.gradle.kts b/version.gradle.kts index dc55d8b2ab..bae585a6c9 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -29,4 +29,4 @@ * * For Spine-based dependencies please see [io.spine.dependency.local.Spine]. */ -val validationVersion by extra("2.0.0-SNAPSHOT.393") +val validationVersion by extra("2.0.0-SNAPSHOT.394")