Skip to content

Commit

Permalink
Rework @ConfigDocSections in Hibernate Search extension documentation
Browse files Browse the repository at this point in the history
Remove unnecessary delimitations for the persistence unit sections
(almost everything is per-persistence unit anyway),
and add sections for more exotic use cases (per-index config).
  • Loading branch information
yrodiere committed Jun 29, 2023
1 parent dc06074 commit 21f56c4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import io.quarkus.hibernate.orm.runtime.PersistenceUnitUtil;
import io.quarkus.runtime.annotations.ConfigDocMapKey;
import io.quarkus.runtime.annotations.ConfigDocSection;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
Expand All @@ -18,7 +17,6 @@ public interface HibernateSearchOutboxPollingRuntimeConfig {
/**
* Configuration for persistence units.
*/
@ConfigDocSection
@WithParentName
@WithUnnamedKey(PersistenceUnitUtil.DEFAULT_PERSISTENCE_UNIT_NAME)
@ConfigDocMapKey("persistence-unit-name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ public interface HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit {
interface CoordinationConfig {

/**
* Default config
* Default configuration.
*/
@ConfigDocSection
@WithParentName
AgentsConfig defaults();

/**
* Per-tenant config
* Per-tenant configuration overrides.
*/
@ConfigDocSection
@ConfigDocMapKey("tenant-id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import io.quarkus.hibernate.orm.runtime.PersistenceUnitUtil;
import io.quarkus.runtime.annotations.ConfigDocMapKey;
import io.quarkus.runtime.annotations.ConfigDocSection;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
Expand All @@ -31,7 +30,6 @@ public interface HibernateSearchElasticsearchBuildTimeConfig {
/**
* Configuration for persistence units.
*/
@ConfigDocSection
@WithParentName
@WithUnnamedKey(PersistenceUnitUtil.DEFAULT_PERSISTENCE_UNIT_NAME)
@ConfigDocMapKey("persistence-unit-name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ interface ElasticsearchBackendBuildTimeConfig {
ElasticsearchIndexBuildTimeConfig indexDefaults();

/**
* Per-index specific configuration.
* Per-index configuration overrides.
*/
@ConfigDocSection
@ConfigDocMapKey("index-name")
Map<String, ElasticsearchIndexBuildTimeConfig> indexes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import io.quarkus.hibernate.orm.runtime.PersistenceUnitUtil;
import io.quarkus.runtime.annotations.ConfigDocMapKey;
import io.quarkus.runtime.annotations.ConfigDocSection;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
Expand All @@ -19,7 +18,6 @@ public interface HibernateSearchElasticsearchRuntimeConfig {
/**
* Configuration for persistence units.
*/
@ConfigDocSection
@WithParentName
@WithUnnamedKey(PersistenceUnitUtil.DEFAULT_PERSISTENCE_UNIT_NAME)
@ConfigDocMapKey("persistence-unit-name")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ interface ElasticsearchBackendRuntimeConfig {
ElasticsearchIndexRuntimeConfig indexDefaults();

/**
* Per-index specific configuration.
* Per-index configuration overrides.
*/
@ConfigDocSection
@ConfigDocMapKey("index-name")
Map<String, ElasticsearchIndexRuntimeConfig> indexes();
}
Expand Down

0 comments on commit 21f56c4

Please sign in to comment.