Skip to content

Commit 6e61df1

Browse files
timonbacksam0r040
andauthored
chore(core): deprecated AsyncApiDocket bean (#422)
Use spring properties instead Co-authored-by: sam0r040 <[email protected]>
1 parent 0e3009c commit 6e61df1

File tree

10 files changed

+15
-1
lines changed

10 files changed

+15
-1
lines changed

springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/operationdata/AbstractOperationDataScanner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import static java.util.stream.Collectors.toSet;
2727

2828
@Slf4j
29+
@Deprecated(forRemoval = true)
2930
public abstract class AbstractOperationDataScanner implements ChannelsScanner {
3031

3132
protected abstract SchemasService getSchemaService();

springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/operationdata/ConsumerOperationDataScanner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
@Slf4j
1414
@RequiredArgsConstructor
15+
@Deprecated(forRemoval = true)
1516
public class ConsumerOperationDataScanner extends AbstractOperationDataScanner {
1617

1718
private final AsyncApiDocketService asyncApiDocketService;

springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/operationdata/ProducerOperationDataScanner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
@Slf4j
1414
@RequiredArgsConstructor
15+
@Deprecated(forRemoval = true)
1516
public class ProducerOperationDataScanner extends AbstractOperationDataScanner {
1617

1718
private final AsyncApiDocketService asyncApiDocketService;

springwolf-core/src/main/java/io/github/stavshamir/springwolf/configuration/AsyncApiDocket.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public class AsyncApiDocket {
4848
* Provides information about the producers.
4949
*/
5050
@Singular
51+
@Deprecated(forRemoval = true)
5152
private final List<ProducerData> producers;
5253

5354
@Singular
55+
@Deprecated(forRemoval = true)
5456
private final List<ConsumerData> consumers;
5557

5658
/**

springwolf-core/src/main/java/io/github/stavshamir/springwolf/configuration/DefaultAsyncApiDocketService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public AsyncApiDocket getAsyncApiDocket() {
4343
private void createDocket() {
4444
if (customDocket.isPresent()) {
4545
log.debug("Reading springwolf configuration from custom defined @Bean AsyncApiDocket");
46+
log.warn("The usage of the @Bean AsyncApiDocket is deprecated and scheduled to be deleted. "
47+
+ "Use the spring properties file instead. "
48+
+ "More details: https://www.springwolf.dev/docs/quickstart");
4649
docket = customDocket.get();
4750
} else {
4851
log.debug("Reading springwolf configuration from application.properties files");

springwolf-core/src/main/java/io/github/stavshamir/springwolf/configuration/properties/SpringwolfConfigProperties.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ public static class ConsumerData {
178178
/**
179179
* This mirrors the ConfigConstant {@see SpringwolfConfigConstants#SPRINGWOLF_SCANNER_PRODUCER_DATA_ENABLED}
180180
*/
181+
@Deprecated(forRemoval = true)
181182
private boolean enabled = true;
182183
}
183184

@@ -188,6 +189,7 @@ public static class ProducerData {
188189
/**
189190
* This mirrors the ConfigConstant {@see SpringwolfConfigConstants#SPRINGWOLF_SCANNER_RABBIT_LISTENER_ENABLED}
190191
*/
192+
@Deprecated(forRemoval = true)
191193
private boolean enabled = true;
192194
}
193195
}
@@ -204,7 +206,7 @@ public static class Endpoint {
204206
private static class Actuator {
205207

206208
/**
207-
* Flag to move the endpoint that exposes the AsyncAPI document beneath Spring Boots actuator endpoint.
209+
* Flag to move the endpoint that exposes the AsyncAPI document beneath Spring Boot's actuator endpoint.
208210
*/
209211
private boolean enabled = false;
210212
}

springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/stavshamir/springwolf/asyncapi/types/AmqpConsumerData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.Collections;
1111
import java.util.Map;
1212

13+
@Deprecated(forRemoval = true)
1314
public class AmqpConsumerData extends ConsumerData {
1415

1516
@Builder(builderMethodName = "amqpConsumerDataBuilder")

springwolf-plugins/springwolf-amqp-plugin/src/main/java/io/github/stavshamir/springwolf/asyncapi/types/AmqpProducerData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.util.Collections;
1111
import java.util.Map;
1212

13+
@Deprecated(forRemoval = true)
1314
public class AmqpProducerData extends ProducerData {
1415

1516
@Builder(builderMethodName = "amqpProducerDataBuilder")

springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/stavshamir/springwolf/asyncapi/types/KafkaConsumerData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import java.util.Map;
1111

12+
@Deprecated(forRemoval = true)
1213
public class KafkaConsumerData extends ConsumerData {
1314
@Builder(builderMethodName = "kafkaConsumerDataBuilder")
1415
public KafkaConsumerData(String topicName, Class<?> payloadType, String description, AsyncHeaders headers) {

springwolf-plugins/springwolf-kafka-plugin/src/main/java/io/github/stavshamir/springwolf/asyncapi/types/KafkaProducerData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import java.util.Map;
1111

12+
@Deprecated(forRemoval = true)
1213
public class KafkaProducerData extends ProducerData {
1314

1415
@Builder(builderMethodName = "kafkaProducerDataBuilder")

0 commit comments

Comments
 (0)