Skip to content

Commit

Permalink
Fix some invalid configuration cases
Browse files Browse the repository at this point in the history
TransactionManagerConfiguration was just plain weird so fixed it.
For the others, we need to mark the interfaces as being config or we
won't generate the Javadoc for them.
  • Loading branch information
gsmet committed Nov 8, 2024
1 parent 30d733f commit bab4a5a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

import io.quarkus.runtime.annotations.ConfigDocDefault;
import io.quarkus.runtime.annotations.ConfigDocMapKey;
import io.quarkus.runtime.annotations.ConfigGroup;

@ConfigGroup
public interface CommonConfig {
/**
* Path to the JVM Dockerfile.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,47 +72,47 @@ public final class TransactionManagerConfiguration {
*/
@ConfigItem
public ObjectStoreConfig objectStore;
}

@ConfigGroup
class ObjectStoreConfig {
/**
* The name of the directory where the transaction logs will be stored when using the {@code file-system} object store.
* If the value is not absolute then the directory is relative
* to the <em>user.dir</em> system property.
*/
@ConfigItem(defaultValue = "ObjectStore")
public String directory;

/**
* The type of object store.
*/
@ConfigItem(defaultValue = "file-system")
public ObjectStoreType type;

/**
* The name of the datasource where the transaction logs will be stored when using the {@code jdbc} object store.
* <p>
* If undefined, it will use the default datasource.
*/
@ConfigItem
public Optional<String> datasource = Optional.empty();

/**
* Whether to create the table if it does not exist.
*/
@ConfigItem(defaultValue = "false")
public boolean createTable;

/**
* Whether to drop the table on startup.
*/
@ConfigItem(defaultValue = "false")
public boolean dropTable;

/**
* The prefix to apply to the table.
*/
@ConfigItem(defaultValue = "quarkus_")
public String tablePrefix;
@ConfigGroup
public static class ObjectStoreConfig {
/**
* The name of the directory where the transaction logs will be stored when using the {@code file-system} object store.
* If the value is not absolute then the directory is relative
* to the <em>user.dir</em> system property.
*/
@ConfigItem(defaultValue = "ObjectStore")
public String directory;

/**
* The type of object store.
*/
@ConfigItem(defaultValue = "file-system")
public ObjectStoreType type;

/**
* The name of the datasource where the transaction logs will be stored when using the {@code jdbc} object store.
* <p>
* If undefined, it will use the default datasource.
*/
@ConfigItem
public Optional<String> datasource = Optional.empty();

/**
* Whether to create the table if it does not exist.
*/
@ConfigItem(defaultValue = "false")
public boolean createTable;

/**
* Whether to drop the table on startup.
*/
@ConfigItem(defaultValue = "false")
public boolean dropTable;

/**
* The prefix to apply to the table.
*/
@ConfigItem(defaultValue = "quarkus_")
public String tablePrefix;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigDocMapKey;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.smallrye.config.WithDefault;

@ConfigGroup
public interface OidcClientCommonConfig extends OidcCommonConfig {
/**
* The OIDC token endpoint that issues access and refresh tokens;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import java.util.OptionalInt;

import io.quarkus.runtime.annotations.ConfigDocDefault;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.smallrye.config.WithDefault;

@ConfigGroup
public interface OidcCommonConfig {
/**
* The base URL of the OpenID Connect (OIDC) server, for example, `https://host:port/auth`.
Expand Down

0 comments on commit bab4a5a

Please sign in to comment.