-
Notifications
You must be signed in to change notification settings - Fork 276
/
Copy pathSemVerConfigProperties.java
28 lines (21 loc) · 1.88 KB
/
SemVerConfigProperties.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package io.apicurio.registry.semver;
import io.apicurio.common.apps.config.Dynamic;
import io.apicurio.common.apps.config.Info;
import jakarta.inject.Singleton;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import java.util.function.Supplier;
@Singleton
public class SemVerConfigProperties {
@Dynamic(label = "Ensure all version numbers are 'semver' compatible", description = "When enabled, validate that all artifact versions conform to Semantic Versioning 2 format (https://semver.org).")
@ConfigProperty(name = "apicurio.semver.validation.enabled", defaultValue = "false")
@Info(category = "semver", description = "Validate that all artifact versions conform to Semantic Versioning 2 format (https://semver.org).", availableSince = "3.0.0")
public Supplier<Boolean> validationEnabled;
@Dynamic(label = "Automatically create semver branches", description = "When enabled, automatically create or update branches for major ('A.x') and minor ('A.B.x') artifact versions.")
@ConfigProperty(name = "apicurio.semver.branching.enabled", defaultValue = "false")
@Info(category = "semver", description = "Automatically create or update branches for major ('A.x') and minor ('A.B.x') artifact versions.", availableSince = "3.0.0")
public Supplier<Boolean> branchingEnabled;
@Dynamic(label = "Coerce invalid semver versions", description = "When enabled and automatically creating semver branches, invalid versions will be coerced to Semantic Versioning 2 format (https://semver.org) if possible.", requires = "apicurio.semver.branching.enabled=true")
@ConfigProperty(name = "apicurio.semver.branching.coerce", defaultValue = "false")
@Info(category = "semver", description = "If true, invalid versions will be coerced to Semantic Versioning 2 format (https://semver.org) if possible.", availableSince = "3.0.0")
public Supplier<Boolean> coerceInvalidVersions;
}