onecx-validator
Installation
If you want to use this extension, you need to add the org.tkit.onecx.quarkus:onecx-validator extension first to your build file.
For instance, with Maven, add the following dependency to your POM file:
<dependency>
<groupId>org.tkit.onecx.quarkus</groupId>
<artifactId>onecx-validator</artifactId>
<version>2.0.0</version>
</dependency>
Usage
Constraints
| Constraints are generated automatically from the open-api definition file. See Constraints |
@Size
@org.tkit.onecx.quarkus.validator.constraints.Size constraints annotation validate the numeric value between min and max attribute. Additional to these constraints contain parameter key which cloud be optionally mapped to the onecx-parameters backend service and this enables dynamic validation of the parameter.
Configuration
Configuration property fixed at build time - All other configuration properties are overridable at runtime
Configuration property |
Type |
Default |
|---|---|---|
Whether parameter-svc is enabled in case the parameter extension is present. Environment variable: |
boolean |
|
Key to parameter-name mapping Environment variable: |
Map<String,String> |
|
Template for the constraint violations error message 6 parameters required: %1$s, %2$s, %3$s, %4$s, %5$d, %6$d Environment variable: |
string |
|